DEV Community

Cover image for How to set up Laravel with PostgreSQL? πŸ’‘
DECK πŸ‘¨β€πŸ’»
DECK πŸ‘¨β€πŸ’»

Posted on

How to set up Laravel with PostgreSQL? πŸ’‘

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.

Image description

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.🌟

Image description

We will love to know your feedback about this quick setup 😊. Install DECK today πŸ’œ

Top comments (0)