I'm some kind of newbie in Laravel, so sorry for dumb questions. I installed XAMPP on my Ubuntu 16.04. And I created a Laravel project "myFirstProject" in the folder "/opt/lampp/htdocs/LaravelProjects". Now I'm trying to use this command
php artisan migrate
But it shows me an error
[Illuminate\Database\QueryException] could not find driver (SQL: select * from informat ion_schema.tables where table_schema = laravel_test and table_name = migrations)
[PDOException] could not find driver
How can I use mysql (which is installed with XAMPP) in my Laravel project?
Here is some code from .env file:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_test
DB_USERNAME=root
DB_PASSWORD=
And this is from database.php:
'default' => env('DB_CONNECTION', 'mysql'),
'mysql' => [
'driver' => 'mysql',
'host' => env('DB_HOST', '127.0.0.1'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'laravel_test'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => true,
'engine' => null,
],