php - Database not configured laravel during migration -


this might repeated question. had no luck previous answers

i git clone laravel project. tried php artisan migrate. returns below error.

[invalidargumentexception]    database [] not configured. 

and

migrate [--bench[="..."]] [--database[="..."]] [--force] [--path[="..."]] [--package[="..."]] [--pretend] [--seed] 

my app/config/database.php this:

    'mysql' => array(         'driver'    => 'mysql',         'host'      => 'localhost',         'database'  => 'upgrade',         'username'  => 'root',         'password'  => 'root',         'charset'   => 'utf8',         'collation' => 'utf8_unicode_ci',         'prefix'    => '',     ), 

i create upgrade database in mysql.

could tell me i'm doing incorrectly?

thanks in advance.

i had same issue. have cloned l5.1 project git , performed

composer install  composer update  

and configured db details in .env (by default .env not present took copy of .env.example , renamed .env). after if tried run

 php artisan migrate 

i got same exception @users4393829 mentioned. tried follow commands find , set database.

 php artisan tinker  >>> config::get('database.connections.mysql.database');  >>>null  >>>config::set('database.connections.mysql.database','homesteaed');  >>>config::get('database.connections.mysql.database');  >>>homesteaed 

after doing things found there no database.php file have placed in 'config' folder , ran migration works. please make sure have config files git ignored in project.


Comments

Popular posts from this blog

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -