Having worked on this all day.. I have come to the conclusion that there is a BUG or something inside the laravel 5 implementation...
When I create a new project... I run php artisan migrate:install.. it works.. if i re-run it I now get table exists..
I then add the environment.php file in bootstrap folder and then rename .env.example to .env and set my database option.. I then add a local/database.php file..
I run php artisan migrate:install.. i now get different errors.. saying table name which incidentally is ' ' ' is incorrect blah blah..
I am pasting it in pastebin: http://laravel.io/bin/BL9Yd
If however I use SQLite inside the folder.. it works so if i do:
<?php
return [
'default' => 'sqlite',
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'database' => ':memory:',
'prefix' => '',
],
// 'mysql' => [
// 'driver' => 'mysql',
// 'host' => env('DB_HOST') ?: 'localhost:8889',
// 'database' => env('DB_DATABASE') ?: 'test',
// 'username' => env('DB_USERNAME') ?: 'root',
// 'password' => env('DB_PASSWORD') ?: 'root',
// 'charset' => 'utf8',
// 'collation' => 'utf8_unicode_ci',
// 'prefix' => '',
// 'port' => 8889,
// 'socket' => '/Applications/MAMP/tmp/mysql/mysql.sock',
// 'strict' => false,
// ],
],
];
Using your solution above, most artisan commands work for me until I attempt to seed the database; then: "Database does not exist" Judging from your old settings, it looks like you were using MAMP as well (as I). Did you figure anything more out about this? The sqlite settings you use above just don't seem to create tables in the Mysql database MAMP uses. Thanks for any updates!
L5 has really gone away from the files in environment folders. When I played with it last, it wasn't merging the files any more, but rather overwriting them. So... I've fully switched over to the env way of doing things.
Basically everything is read from the environment. (.env) file. L5 out of the box has an example of this is in the database.php file.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community