Documentation v8.1.9

Troubleshoot

Database connection

Verify that your database information is correct before start to run the database migration command.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel
DB_USERNAME=root
DB_PASSWORD=
Run this command to refresh the .env file update.
php artisan config:clear
Then retry with the migration.
php artisan migrate:fresh --seed

Composer Framework Requirement Error

[plugin..] requires php ^5.3.3 || ^7.0 -> your php version (8.0.3) does not satisfy that requirement.
If you are using the PHP v8, some plugins are not supported in the latest Laravel version and may cause installation errors. The new --ignore-platform-req option can be used to set specific requirements that Composer can ignore.
composer install --ignore-platform-req=php --optimize-autoloader

Database Connection Error

PDOException::("SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it")
Check if your web server already started. Start the MySQL in the XAMPP controller, WAMP, etc. Check the database port to DB_PORT=3306 in .env file. Try to run the following commands:
php artisan config:clear
php artisan cache:clear