From 35e419215233d6861bb902d03f33b4be453aeef0 Mon Sep 17 00:00:00 2001 From: P1raten Date: Thu, 17 Jan 2013 07:52:54 +0100 Subject: [PATCH] Update src/Illuminate/Foundation/Console/KeyGenerateCommand.php Changed so that the key be what ever you want when you generate it. --- src/Illuminate/Foundation/Console/KeyGenerateCommand.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Foundation/Console/KeyGenerateCommand.php b/src/Illuminate/Foundation/Console/KeyGenerateCommand.php index ca6f3ffbd359..2bd384d45da0 100644 --- a/src/Illuminate/Foundation/Console/KeyGenerateCommand.php +++ b/src/Illuminate/Foundation/Console/KeyGenerateCommand.php @@ -41,7 +41,10 @@ public function fire() { $contents = $this->files->get($path = $this->laravel['path'].'/config/app.php'); - $contents = str_replace('YourSecretKey!!!', $key = $this->getRandomKey(), $contents, $count); + $content = explode("'key' => '", $contents); + $content = explode("',", $content[1]); + + $contents = str_replace($content[0], $key = $this->getRandomKey(), $contents, $count); if ($count == 0) { @@ -67,4 +70,4 @@ protected function getRandomKey() return substr(str_shuffle(str_repeat($pool, 5)), 0, 32); } -} \ No newline at end of file +}