Illuminate\Database\QueryException could not find driver
IlluminateDatabaseQueryException could not find driver
In this article, we will see how to solve "IlluminateDatabaseQueryException could not find driver".
You have to enable the pdo_mysql extension in php.ini file to avoid the error Illuminate\Database\QueryException could not find driver in Laravel-
Enable pdo_mysql using php.ini file
--PATH E:\laragon\bin\php\php-8.0.16-Win32-vs16-x64\php.iniextension=pdo_mysql
Just remove the ; from the ;extension=pdo_mysql in the php.ini file to avoid the exception in Laravel.
File path may be different.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
Don't forget to share this article! Help us spread the word by clicking the share button below.
We appreciate your support and are committed to providing you valuable and informative content.
We are thankful for your never ending support.
Random Code Snippet Queries: Laravel
- Laravel 9 pagination with search filter
- Delete all related comments on deleting a post in Laravel
- Laravel route parameter
- How to get specific columns using with method in laravel Eloquent relationship
- SQLSTATE[42000]: Syntax error or access violation: 1075 Incorrect table definition; there can be only one auto column and it must be defined as a key
- Target class [App\Http\Controllers\Auth\Request] does not exist.
- How to check find method executed successfully in laravel
- Conditional where clause in Laravel
- How to display serial number in Laravel?
- How to get user information using hootlex/laravel-friendships package in laravel
- How to fetch single row data from database in laravel
- Print query in laravel
- Laravel clone model
- Create a record if not exist in laravel
- How to run a specific seeder class in laravel
- Convert multidimensional array to single array in Laravel
- Comment .env file in laravel
- Generate unique username in Laravel
- RuntimeException You must enable the openssl extension in your php.ini to load information from https://repo.packagist.org
- Laravel file size validation not working
- How to make Copy or Duplicate table row in laravel
- How to automatically update the timestamp of parent model in Laravel
- Attempt to read property "avatar" on null in Laravel
- Declaration of App\Models\Post::sluggable() must be compatible with Cviebrock\EloquentSluggable\Sluggable
- How to send email in Laravel 11