Deploy Laravel application with a database to Heroku

Image for post
Image for post

Prerequisites

Create a Laravel Application

Initialize a Git repository

Create Procfile file

Login to Heroku CLI

Create a new application on Heroku

heroku config vars
heroku config vars
Heroku Config Vars

Add Database

add database
add database
Add database
Image for post
Image for post
Dashboard — Resource
Image for post
Image for post
config/detabase.php
Image for post
Image for post
config/database.php
heroku run bash
php artisan migrate

Facilitator | Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store