Fix Error SQLSTATE[42000] In Lumen
1 min readMar 29, 2019
Doing things in Lumen may not be exactly same with Laravel, why? It’s because Lumen is intended to write an API application rather than a complete web application. This differences sometimes lead us to a painful situation when debugging an error.
If you experience an error SQLSTATE[4200] when running php artisan migrate
command then all you need to do is adding migrations
key into your database config file (database.php), you may have to create the file first if it’s not presented in directory config
This is my database config file looks like: