Skip to content

Commit

Permalink
Fix controller namespace in route file
Browse files Browse the repository at this point in the history
  • Loading branch information
sohelamin committed Sep 17, 2020
1 parent 0e41ccc commit 96e03ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/Commands/CrudApiCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()));

Expand Down
2 changes: 1 addition & 1 deletion src/Commands/CrudCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -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()));

Expand Down

0 comments on commit 96e03ca

Please sign in to comment.