Quando executor php artisan migrate ,me retorna isso :
Illuminate\Database\QueryException : could not find driver (SQL: select * from information_schema.tables where table_schema = projeto_clinica and table_name = migrations and table_type = 'BASE TABLE')
at C:\Users\Projeto Clinica\projeto-clinica\vendor\laravel\framework\src\Illuminate\Database\Connection.php:664
660| // If an exception occurs when attempting to run a query, we'll format the error
661| // message to include the bindings with SQL, which will make this exception a
662| // lot more helpful to the developer instead of just the database's errors.
663| catch (Exception $e) {
> 664| throw new QueryException(
665| $query, $this->prepareBindings($bindings), $e
666| );
667| }
668|
Exception trace:
1 Doctrine\DBAL\Driver\PDOException::("could not find driver")
C:\Users\Projeto Clinica\projeto-clinica\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:31
2 PDOException::("could not find driver")
C:\Users\Projeto Clinica\projeto-clinica\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:27
Please use the argument -v to see more details.
Meu arquivo ENV:
DB_CONNECTION=mysql
DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=projeto_clinica
DB_USERNAME=root
DB_PASSWORD=
Meu arquivo dataBase:
'default' => env('DB_CONNECTION', 'mysql'),
'connections' => [
'sqlite' => [
'driver' => 'sqlite',
'url' => env('DATABASE_URL'),
'database' => env('DB_DATABASE', database_path('database.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),
],
'mysql' => [
'driver' => 'mysql',
'url' => env('DATABASE_URL'),
'host' => env('DB_HOST', 'localhost'),
'port' => env('DB_PORT', '3306'),
'database' => env('DB_DATABASE', 'projeto_clinica'),
'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''),
'unix_socket' => env('DB_SOCKET', ''),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'prefix_indexes' => true,
'strict' => true,
'engine' => null,
'options' => extension_loaded('pdo_mysql') ? array_filter([
PDO::MYSQL_ATTR_SSL_CA => env('MYSQL_ATTR_SSL_CA'),
]) : [],
],
A extensão extension=pdo_mysql ,já esta descomentada no php.ini