salama2121
salama2121

Reputation: 59

Do I need to set the Application Key in Laravel 5.2

In my app.php file I have this configuration:

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

'cipher' => 'AES-256-CBC',

Do I need to seet the encription key (the one that's on the env.php file) or now. The one that's in the env.php file is longer than 32 characters.

And also in the app.php for configuration is it better if I set the debugging value to true:

'debug' => env('APP_DEBUG', true),

Thanks a lot for your help.

Upvotes: 1

Views: 338

Answers (3)

Abdullah Al Shakib
Abdullah Al Shakib

Reputation: 2044

You can set application key two ways.

1. php artisan key:generate

Or

2. Edit config/app.php and change 

'key' => env('APP_KEY', 'XXXXXXX') // key

Upvotes: 1

zort
zort

Reputation: 46

Yes you need to set the key. You can do it easily by:

php artisan key:generate

of course, after fresh install composer does it for you and you don't have to change anything. You only need to generate the key if you're installing from github/without the use of composer.

Upvotes: 1

Nauman Zafar
Nauman Zafar

Reputation: 1103

Once you have laravel application installed. The key is generated and updated in .env file. No need to set it up in app/config.php.

Upvotes: 1

Related Questions