heroku git:remote -a HEROKU_APP_NAME_HERE
git add .
git commit -m "First Commit"
git subtree push --prefix NAME_OF_SUBFOLDER_HERE heroku master
git remote rm heroku
- Create Procfile and add :
web: vendor/bin/heroku-php-apache2 public
- run :
heroku git:remote -a HEROKU_APP_NAME_HERE
git add .
git commit -m "your message"
git push heroku master
- go to Heroku -> settings -> Reveal config vars
- Create APP_KEY : base64.......... (from .env file)
- To add database we will use PostGres : go to Heroku -> Resources -> Add-ons -> postgres
- Go to Heroku -> settings -> Reveal config vars and you will find DATABASE_URL postgres://:@:/
- Config will look like this
- run
heroku run bash
php artisan migrate:fresh
More info : https://medium.com/@sdkcodes/how-to-deploy-a-laravel-app-to-heroku-24b5cb33fbe