To fix a 500 error on your Laravel Application, follow these instructions:
This is because you have not setup the a key, we will setup the configurations with a command.
NOTE: you can get these values from the .env file.
heroku config:add APP_NAME=Laravel
heroku config:add APP_ENV=production
heroku config:add APP_KEY=[APP_KEY VALUE from .env]
heroku config:add APP_DEBUG=true
heroku config:add APP_URL=EXAMPLE.herokuapp.com
If you don't have any of these Key values, the main configuration causing the 500 error is the APP_DEBUG and APP_KEY - you must provide atleast these two to resolve the 500 error.
Or you can do this without a command with the following steps:
First thing to do is to go to your Heroku Dashboard:
a. click on the application name you just created
b. click on the settings tab
c. under the Config Vars section, click on the "Reveal Config Vars" button
d. Populate each field as follows from the .env file in your app
lick the "Add" button
NOTE: the APP_KEY can be found in your .env file
* Set to true so you can debug your app, otherwise, set to false on production apps
Refresh your browser to https://NAME_OF_APPLICATION.herokuapp.com/
This time you will see your application and not the 500 error