当前位置:网站首页>Laravel framework operation error: no application encryption key has been specified

Laravel framework operation error: no application encryption key has been specified

2022-07-05 13:38:00 Summer is already slightly cool

One 、 A scenario

start-up Laravel Frame item error :Whoops, looks like something went wrong,
modify config/app.php, Show BUG details : hold 'debug' => env('APP_DEBUG', false), Change it to 'debug' => env('APP_DEBUG', true),, Report errors :No application encryption key has been specified

Two 、 Reasons for appearance

  • The reason for this problem is : Not in the .env Set the application in the file Encryption key

3、 ... and 、 terms of settlement

  • Linux in , Execute the command in the root of the project :php artisan key:generate, as follows
     Insert picture description here

  • After setting successfully APP_KEY It will be in the root directory .env It shows , as follows
     Insert picture description here

Four 、 other

原网站

版权声明
本文为[Summer is already slightly cool]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207051331244614.html