I am new to laravel. I use homestead for development. I have two database connection
database.php
'cust_main_db' => [
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'project_db',
'username' => 'homestead',
'password' => 'secret',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
'admin_main_db' => [
'driver' => 'mysql',
'host' => 'localhost',
'database' => 'projectadmin_db',
'username' => 'homestead',
'password' => 'secret',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
'strict' => false,
],
Homestead.yaml
databases:
- homestead
In my local mysql has both databases project_db
and projectadmin_db
When I run the project http://ift.tt/1mROfU6
it shows SQLSTATE[HY000] [1049] Unknown database 'projectadmin_db'
What I have missed here? Correct me if anything wrong.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire