From f02bbb83fc729119499bad225572be9b8c6bd050 Mon Sep 17 00:00:00 2001 From: Mohamed Said Date: Fri, 23 Sep 2016 15:50:03 +0200 Subject: [PATCH] fix #15570 by replacing only the first instance of the app namespace --- src/Illuminate/Console/GeneratorCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Console/GeneratorCommand.php b/src/Illuminate/Console/GeneratorCommand.php index 65203f9c8e25..97d4c49d9da4 100644 --- a/src/Illuminate/Console/GeneratorCommand.php +++ b/src/Illuminate/Console/GeneratorCommand.php @@ -87,7 +87,7 @@ protected function alreadyExists($rawName) */ protected function getPath($name) { - $name = str_replace($this->laravel->getNamespace(), '', $name); + $name = str_replace_first($this->laravel->getNamespace(), '', $name); return $this->laravel['path'].'/'.str_replace('\\', '/', $name).'.php'; }