Laravel No application encryption key has been specified - laravel latest version

Опубликовано: 20 Октябрь 2024
на канале: Simple solution
5,483
29

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:generate command to generate this key

No application encryption key has been specified.
Illuminate\Encryption\MissingAppKeyException
No application encryption key has been specified.
http://127.0.0.1:8000/

Your app key is missing
Generate your application encryption key using php artisan key:generate.

Copy .env.example to .env:

cp -a .env.example .env

Generate a key:

php artisan key:generate

Only then run:

php artisan serve
php artisan key:generate
php artisan config:cache