Step 1: Update .env file DB Credentails
The 1st step is to update the environment file and DB credentials located inside the ".env" file. Do note that the setting will be depending on your database provider "MySQL" or "PostgreSQL" and etc.
DB_CONNECTION=pgsql DB_HOST=127.0.0.1 DB_PORT=5432 DB_DATABASE= DB_USERNAME=postgres DB_PASSWORD=
Step 2: Clear Cache
Once you have updated the DB_ values you need to clear the cache so that Larave read the new updated environment files.
php artisan config:clear
Step 3: Restart Server
If you are using a Local server then you can restart and rerun "php artisan serve" once again.
php artisan serve
valet restart
vagrant reload --provision
Leave a reply