Commit d20deb28 authored by Taylor Otwell's avatar Taylor Otwell

die out if application key is not set.

parent 2b12c0c1
...@@ -15,15 +15,9 @@ require 'core.php'; ...@@ -15,15 +15,9 @@ require 'core.php';
*/ */
if (Config::$items['application']['application']['key'] == '') if (Config::$items['application']['application']['key'] == '')
{ {
$key = Str::random(32); $path = 'application/config/application.php';
Config::set('application.key', $key); die("Please set an application key in <b>{$path}</b>.");
$config = File::get(path('app').'config/application'.EXT);
$config = str_replace("'key' => ''", "'key' => '{$key}'", $config);
File::put(path('app').'config/application'.EXT, $config);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment