Laravel saves the new key in the environments variables (.env) file. The following code is from the 'key generate' command.
$path = base_path('.env');
if (file_exists($path)) {
file_put_contents($path, str_replace(
'APP_KEY='.$this->laravel['config']['app.key'], 'APP_KEY='.$key, file_get_contents($path)
));
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community