What should be in the .env hasn't been explicitly stated in other solutions, and thought I'd boil it down to the sentence above.
This fixed my 500 error on a fresh install of Laravel.
Steps:
touch .env
)APP_KEY=
php artisan key:generate
Notes:
My particular installation didn't include any .env whatsoever (example or otherwise)
Simply having a blank .env does not work.
A .env containing parameters, but no APP_KEY
parameter, does not work.
Bug?: When generating an app key in terminal, it may report as successful, however no key will actually get placed in the .env if the file has no pre-existing APP_KEY=
line.
As a reference, here's the official .env with useful baseline parameters. Copy-paste what you need: