Cześć,
przerabiam pewien tutorial z Laravela na YT i dotarłem do momentu konfigurowania baz danych. Zainstalowałem już xamplite, włączyłem mysql i uruchomiłem shella. Stworzyłem w nim konto i nadałem uprawienia, potem stworzyłem bazę danych. Została jeszcze konfiguracja pliku .env
.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laragigs
DB_USERNAME=damian
DB_PASSWORD=password
Potem nadszedł czas na migrację, więc w visual studio w projekcie wpisałem w terminalu php artisan migrate
i pojawił się poniższy błąd:
could not find driver (SQL: select * from information_schema.tables where table_schema = laragigs and table_name = migrations and table_type = 'BASE TABLE')
at C:\Users\damian\Documents\Laravel\nauka\vendor\laravel\framework\src\Illuminate\Database\Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we'll format the error
709▕ // message to include the bindings with SQL, which will make this exception a
710▕ // lot more helpful to the developer instead of just the database's errors.
711▕ catch (Exception $e) {
➜ 712▕ throw new QueryException(
713▕ $query, $this->prepareBindings($bindings), $e
714▕ );
715▕ }
716▕ }
1 C:\Users\damian\Documents\Laravel\nauka\vendor\laravel\framework\src\Illuminate\Database\Connectors\Connector.php:70
PDOException::("could not find driver")
Sprawdzałem na stackoverflow, sporo osób ma z tym problem ale zaproponowane rozwiązania nie pomogły.