No Application Encryption Key Has Been Specified
I'm new to Laravel and I'm trying to use the Artisan command...
php artisan serve
Laravel development server started: http://127.0.0.1:8000
However, it won't automatically launch and when I manually enter http://127.0.0.1:8000 it shows this error:
RuntimeException No application encryption key has been specified.
Any ideas? I'm using Laravel framework 5.5-dev.
Verified Answer (418 Votes) ✓
"Before using Laravel's encrypter, you must set a key option in your config/app.php configuration file. You should use the
php artisan key:generatecommand to generate this key"
I found that using this complex internet query in google.com:
"laravel add encrption key" (Yes, it worked even with the typo!)
Answer #2 (121 Votes)
In my case, I also needed to reset the cached config files:
php artisan key:generate php artisan config:cache
Answer #3 (52 Votes)
Open command prompt in the root folder of your project and run below command:
php artisan key:generate
It will generate Application Key for your application.
You can find the generated application key(APP_KEY) in