laravel 4: key not being generated with artisan

后端 未结 7 2183
温柔的废话
温柔的废话 2020-12-15 05:39

When running

php artisan key:generate

I can see the generated key in my shell, but the variable \'key\' in app.php remains empt

7条回答
  •  难免孤独
    2020-12-15 06:34

    The key generator will only update the APP_KEY in the .env file.

    'key' => env('APP_KEY', 'YourSecretKey'), 
    

    config/app.php this is reading the APP_KEY from your .env file. The second parameter is a fallback.

提交回复
热议问题