There are lots of websites out there with tutorials running a Laravel installation on Heroku. While I believe that they should all work (more-or-less) I feel that with Laravel's constant updates, changes occur that depreciate the numbers tutorials that exist. I had a bit of trouble getting my Laravel website up and running after getting it working on Homestead in ~5mins.
This was a very helpful start
Laravel 5 - Deploy to Heroku Martin Cruz Otiniano > composer create-project laravel/laravel my_name_app > cd my_name_app > git init > git add -A > git commit -m "Initial commit" > heroku login > heroku create my-name-app-heroku > heroku buildpacks:set https://github.com/heroku/heroku-buildpack-php > git push heroku master > heroku open > touch Procfile Edit file and save web: vendor/bin/heroku-php-apache2 public > git add Procfile > git commit -m "Add file Procfile" > git push heroku master > heroku open
However, I ran into the issue of where my homepage wasn't rendering any css.
Digging through some google searchs I found this:
heroku run composer update
The search I found had some other similar command, I extrapolated that running composer update would work too. This appeared to be the fix, however, I do want to note that I also ran
heroku config:set LARAVEL_ENV=heroku
I don't know if this did anything. I don't believe so, but maybe. I checked my website afterwards and it was up and running just fine.
For reference, these links helped me figure this out:
Pay attention to the heroku_create file in side of shin1x1's git repo.
Also, this defaults to https instead of http. You cannot access this using https by default. The asset linking through blade will be blocked and the website will not load any css.
Get the latest posts delivered right to your inbox.