Edit the .env file and use the correct database name in the DB_DATABASE key. code example

Example 1: Edit the .env file and use the correct database name in the DB_DATABASE key.

php artisan config:clear
php artisan cache:clear
php artisan route:clear
php artisan view:clear
php artisan optimize

Example 2: 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.

php artisan config:cache