When you get this error, php artisan migrate gives me an error could not find driver while working on wamp server and you get confused about how to solve it then you are at right place.
Here i am going to give you step by step solution for this error.
So let’s begin,
Most common reason behind this error is when you run more then one php versions on same wamp server.
If you have more then one php versions or have only one php version -installed in your wamp server then you need to follow below steps to resolve this error.
If you have two versions enabled in your wamp server then one is used for CLI and another one for web server.
Check your phpinfo (you can check this by opening localhost in your web browser as shown below), which php.ini is being used and also run php –ini command in your CLI or CMD.
Check php.ini file path in phpinfo and php –ini is same or not?
Yes that’s true the phpinfo and php –ini show two different php.ini files, right?
If Yes, then check php version in both phpinfo and php –ini.
If php version is same, then un-comment the following line by removing ; as shown below in both php.ini files.
After un-comment this extension don’t forget to restart your wamp server.
Hurray that’s it
I hope this article helped you to resolve php artisan migrate gives could not find driver error.
If you still have any query on JSON encode and decode in PHP then let me know by comment below.
Happy to help you.