Support the ongoing development of Laravel.io →
Installation Configuration
Last updated 2 years ago.
0

This is because it is not supposed to change anything in config/app.php. Notice that uses the env function:

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

That means that it will look for your application key in the environment variables and default back to SomeRandomString if it isn't found. The reason environment variables are used for this is that APP_KEY shouldn't be hardcoded in the source. Ie. think of the example where you want to deploy multiple copies of your application, then all deployments would share the same APP_KEY (which is bad practice).

.env is just a convenient way of prepping your own development environment. In production you just set the APP_KEY environment variable as part of your deployment.

Not something I would recommend, but alternatively you could replace the env function call on 'key' with a string containing the key that the artisan job showed you, like so:

'key' => 'OtherRandomString',
0

Sign in to participate in this thread!

Eventy

Your banner here too?

trnikon trnikon Joined 13 Mar 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.