The Basetableorviewnotfound: 1146 Table & #039; homestead. fyl_menu & #039; doesn & #039; texist (SQL: select * fromfyl_menu) error occurs when I install laravel12.2.0 in the morning. My laravel configuration file {code...} Me... I installed laravel 12.2.0 in the morning.
Base table or view not found: 1146 Table 'homestead. fyl_menu 'doesn' t exist (SQL: select * from fyl_menu)
Error.
My laravel configuration file
'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'fyl'), 'username' => env('DB_USERNAME', 'homestead'), 'password' => env('DB_PASSWORD', 'secret'), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, ],
The fyl_menu table exists in the fyl database in my database. Unfortunately, the error message does prompt homestead. fyl_menu. In the laravl framework, the makeConnection method in IlluminateDatabaseDatabaseManager prints the config variable to output homestead data. Modification to other fields in the configuration file is valid.
Hope you will be familiar with lavavel.
Reply content:
In the morning, I installed laravel 12.2.0.
Base table or view not found: 1146 Table 'homestead. fyl_menu 'doesn' t exist (SQL: select * from fyl_menu)
Error.
My laravel configuration file
'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), 'database' => env('DB_DATABASE', 'fyl'), 'username' => env('DB_USERNAME', 'homestead'), 'password' => env('DB_PASSWORD', 'secret'), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', 'strict' => false, ],
The fyl_menu table exists in the fyl database in my database. Unfortunately, the error message does prompt homestead. fyl_menu. In the laravl framework, the makeConnection method in IlluminateDatabaseDatabaseManager prints the config variable to output homestead data. Modification to other fields in the configuration file is valid.
Hope you will be familiar with lavavel.
The configuration file is in.env
Env ('db _ host', 'localhost') indicates that he will go back to the. env file and find DB_HOST. If the file cannot be found, use the localhost
It is best not to use the config/database. the PHP file is usually used to configure databases. env file configuration, because if you use git ,. the env file is in. the gitignore file is not submitted. If you configure it in the datebase file, you can check the database configuration data, which is not safe.