When going to local server for laravel, I get 500 error every time
So, I'm running Linux Mint and decided to try to learn Laravel for job reasons. I installed everything as instructed by the Laravel installation page, I run PHP 7.2.7 and Laravel Installer 2.0.1 (how do I check version?).
I run php artisan serve, I get no errors and I go to the page, and lo and behold - there's a 500 error. There's no error, the command line only tells me that it served 500.svg. I am lost as to what I should do at this point, I really can't continue learning if I can't even start the server.
If you installed Laravel using the installer, and are php artisan serve with the same user, then permissions to write to the logs should not be the issue, so first checkstorage/logs/laravel.log` to see if there are any errors logged in there.
I've got this error repeated over and over again: [2018-09-27 22:35:10] production.ERROR: No application encryption key has been specified. {"exception":"[object] (RuntimeException(code: 0): No application encryption key has been specified. at ~/Programming/plswork/vendor/laravel/framework/src/Illuminate/Encryption/EncryptionServiceProvider.php:42)
Oh my god, it works! I had some problems with that earlier because I didn't have any .env file, but I just renamed the .env.example, ran that command and then it worked!! Thanks!!! :D
Yorki is correct, however, first need to have the .env copied from the example (also from SO, might want to do "config:cache" as well to create a cache file):