I added in ENV file on Heroku informations from Awardspace, because I want to connect that database with Laravel project deployed on Heroku. I am getting error SQLSTATE[HY000] [2002] Connection refused
CodePudding user response:
you have these credentials you should put it in settings -> config vars->
DATABASE_URL
DB_CONNECTION=pgsql
DB_DATABASE
DB_HOST
DB_PASSWORD
DB_PORT
DB_USERNAME
after added these credentials with database
you should run in bash
php artisan migrate
and work fine
hopefully that is help you
CodePudding user response:
use this command for clear cache.
php artisan optimize:clear
php artisan optimize