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
1 commentaire:
Laravel Development Company: ExpressTech Software Solutions offering Custom Laravel Development Services like Laravel RESTful API Development with Integration solution. +91-9806724185 or Contact@expresstechsoftwares.com
Enregistrer un commentaire