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!

 
13
Kudos
 
13
Kudos

Now read this

3 apps that every college student should use

These apps will super-charge your life. They’ll make you more productive than you’ve ever been. They’ll pretty much write that 900 word essay you’ve been procrastinating on. Here’s a list of 3 incredibly sexy apps that are available on... Continue →