Laravel + Postgres local setup.

Here are the steps to get your local (mac) environment setup with Laravel and Postgres.

Bash commands: #

laravel new my-project
cd my-project

Make the Postgres database: #

While you have postgres running locally, use the createdb command line tool to create a new database.
createdb my-project

.env File: #

Edit the .env file in your Laravel project.

DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=my-project
DB_USERNAME=<your-mac-username>
DB_PASSWORD=password

Migration setup: #

php artisan migrate:install

That’s it! You’re rocking and rollin’ with a local Laravel & Postgres setup!

 
22
Kudos
 
22
Kudos

Now read this

Moving my blog from Svbtle to Substack

I was an early user on Svbtle back when I saw a “Show HN” thread about it on HackerNews. I love the minimal design. I love how it works really well on mobile. I dig the draft preview URLs. I think the composer makes it super easy to... Continue →