added auto_key config option.

This commit is contained in:
Taylor Otwell 2012-02-17 09:00:53 -06:00
parent faa2eec3b9
commit ba3f62f79a
2 changed files with 9 additions and 1 deletions

View File

@ -38,10 +38,16 @@
| remain secret and should not be shared with anyone. Make it about 32
| characters of random gibberish.
|
| The "auto_key" option tells Laravel to automatically set this key value
| if one has not already been set. This is generally done on the first
| request to the Laravel splash screen.
|
*/
'key' => '',
'auto_key' => true,
/*
|--------------------------------------------------------------------------
| Application Character Encoding

View File

@ -57,7 +57,9 @@
* string for the developer. This provides the developer with
* a zero configuration install process.
*/
if (Config::get('application.key') == '')
$auto_key = Config::get('application.auto_key');
if ($auto_key and Config::get('application.key') == '')
{
ob_start() and with(new CLI\Tasks\Key)->generate();