I want to deploy my laravel app in ubuntu server 18 LTS. So I have install nginx postgres php. But when i try to do php artisan migrate I have this returned error :
This is the errror (a picture beacose of comande line) .
So I have verify different thing : First I can access to my data base in localhost with the postgres user. The laravel app work while database not be required.
In php.ini I have uncomment extention=pdo-pgsql; and extention=pgsql
I have install the php postgres sql extension with this command sudo apt-get install php7.2-pgsql
And this is my .env settings for database in laravel :
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5433
DB_DATABASE=THERY //I have already create the database
DB_USERNAME=postgres
DB_PASSWORD=postgres
DB_HOST=localhostinstead ofDB_HOST=127.0.0.1in your .env.