From 96e03ca8c711a96aca9199d6c90b94ddffa49869 Mon Sep 17 00:00:00 2001 From: Sohel Amin Date: Fri, 18 Sep 2020 00:46:25 +0600 Subject: [PATCH] Fix controller namespace in route file --- src/Commands/CrudApiCommand.php | 2 +- src/Commands/CrudCommand.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Commands/CrudApiCommand.php b/src/Commands/CrudApiCommand.php index 473c954..274d540 100644 --- a/src/Commands/CrudApiCommand.php +++ b/src/Commands/CrudApiCommand.php @@ -133,7 +133,7 @@ public function handle() } if (file_exists($routeFile) && (strtolower($this->option('route')) === 'yes')) { - $this->controller = ($controllerNamespace != '') ? $controllerNamespace . '\\' . $name . 'Controller' : $name . 'Controller'; + $this->controller = ($controllerNamespace != '') ? $controllerNamespace . $name . 'Controller' : $name . 'Controller'; $isAdded = File::append($routeFile, "\n" . implode("\n", $this->addRoutes())); diff --git a/src/Commands/CrudCommand.php b/src/Commands/CrudCommand.php index f9cfc31..b774eaf 100644 --- a/src/Commands/CrudCommand.php +++ b/src/Commands/CrudCommand.php @@ -146,7 +146,7 @@ public function handle() } if (file_exists($routeFile) && (strtolower($this->option('route')) === 'yes')) { - $this->controller = ($controllerNamespace != '') ? $controllerNamespace . '\\' . $name . 'Controller' : $name . 'Controller'; + $this->controller = ($controllerNamespace != '') ? $controllerNamespace . $name . 'Controller' : $name . 'Controller'; $isAdded = File::append($routeFile, "\n" . implode("\n", $this->addRoutes()));