PS C:\xampp\htdocs\my projets\laravel-vue-spa> php artisan make:migration create_larvel
Created Migration: 2022_04_04_215848_create_larvel
PS C:\xampp\htdocs\my projets\laravel-vue-spa> php artisan migrate
Illuminate\Database\QueryException
SQLSTATE[HY000] [1049] Unknown database 'laravel' (SQL: select * from information_schema.tables where table_schema = laravel and table_name = migrations and table_type = 'BASE TABLE')
at C:\xampp\htdocs\my projets\laravel-vue-spa\vendor\laravel\framework\src\Illuminate\Database\Connection.php:692
688▕ // If an exception occurs when attempting to run a query, we'll format the error
689▕ // message to include the bindings with SQL, which will make this exception a
690▕ // lot more helpful to the developer instead of just the database's errors.
691▕ catch (Exception $e) {
➜ 692▕ throw new QueryException(
693▕ $query, $this->prepareBindings($bindings), $e
694▕ );
695▕ }
696▕ }
• Database name seems incorrect: You're using the default database name laravel
. This database does not exist.
Edit the `.env` file and use the correct database name in the `DB_DATABASE` key.
https://laravel.com/docs/master/database#configuration
1 C:\xampp\htdocs\my projets\laravel-vue-spa\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDO\Exception.php:18
Doctrine\DBAL\Driver\PDO\Exception:🙁"SQLSTATE[HY000] [1049] Unknown database 'laravel'")
2 C:\xampp\htdocs\my projets\laravel-vue-spa\vendor\doctrine\dbal\lib\Doctrine\DBAL\Driver\PDOConnection.php:43
Doctrine\DBAL\Driver\PDO\Exception::new()
PS C:\xampp\htdocs\my projets\laravel-vue-spa>