How to set up Laravel with PostgreSQL? 💡

DECK
1 min readMar 16, 2022

DECK has separate images for Laravel and PostgreSQL. So let’s look at how we can set it up in just two clicks.

First, choose an image for Laravel

You can select either Nginx-PHP or apache-PHP or Laravel image, add details like project name, PHP version, Select PostgreSQL extensions, and select project path.
Hit save, and now you are done with the Laravel project setup.

Set up Laravel app

Second, choose the PostgreSQL stack.

Enter a project name and add database details. Hit save, and now you are ready to add database environment variables in your Laravel project .env file, like DB_HOST, DB_CONNECTION, DB_PORT, DB_DATABASE, DB_USERNAME, DB_PASSWORD.

I got you. Where can you find those environment variables values? 🤔

Start the PostgreSQL stack and open the Actions & Insights panel and check the Postgres stack.🌟

Postgres

We will love to know your feedback about this quick setup 😊. Install DECK today 💜

--

--

DECK

Modern & extendable local web development studio