I installed Laravel 5 via composer and after the installation the App Key was generated automatically. I went to .env
file and I could see the APP_KEY there. However, I also noticed that there is another APP_KEY inside config/app.php
like this:
'key' => env('APP_KEY', 'SomeRandomString'),
'cipher' => 'AES-256-CBC',
My newbie questions are:
1) Why is there App keys in 2 different locations?
2) When App Key was generated, why didnt it update the config/app.php
file as well?
3) Do I need to manually paste the .env
App key into the config/app.php
file too or will that be not necessary as long as .env
has it there?
4) During future updates, do I need to keep adding the App key into app.php file? Meaning, would it get reseted during updates?