diff --git a/composer.json b/composer.json index 900bff2..2517a2a 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "crestapps/laravel-code-generator", "license": "MIT", "description": "An intelligent code generator for Laravel framework that will save you time! This awesome tool will help you generate resources like views, controllers, routes, migrations, languages and/or form-requests! It is extremely flexible and customizable to cover many on the use cases. It is shipped with cross-browsers compatible template, along with a client-side validation to modernize your application.", - "version": "v2.4.8", + "version": "v2.4.9", "keywords": [ "laravel","crud","crud generator", "laravel crud generator","laravel crud builder", diff --git a/src/Commands/Framework/CreateRoutesCommand.php b/src/Commands/Framework/CreateRoutesCommand.php index 03bf1ac..c8bbda6 100644 --- a/src/Commands/Framework/CreateRoutesCommand.php +++ b/src/Commands/Framework/CreateRoutesCommand.php @@ -27,7 +27,7 @@ class CreateRoutesCommand extends Command {--routes-prefix=default-form : Prefix of the route group.} {--controller-directory= : The directory where the controller is under.} {--without-route-clause : Create the routes without where clause for the id.} - {--routes-type= : The type of the route to create "api", "api-docs" or web.} + {--routes-type= : The type of the route to create. (i.e., "api", "api-docs" or "web".)} {--api-version= : The api version to prefix your resurces with.} {--template-name= : The template name to use when generating the code.}'; @@ -62,11 +62,10 @@ public function handle() } $stub = $this->getRoutesStub($input->type); - $controllnerName = $this->getControllerName($input->controllerName, $input->controllerDirectory); - $controllerNamespace = $this->getControllersNamespace($controllnerName, $input->controllerDirectory); + $controllerNamespace = $this->getControllersNamespace($input->controllerName, $input->controllerDirectory); $useControllerLine = $this->getUseClassCommand($controllerNamespace); $this->replaceModelName($stub, $input->modelName) - ->replaceControllerName($stub, $controllnerName) + ->replaceControllerName($stub, $input->controllerName) ->replaceRouteNames($stub, $this->getModelName($input->modelName), $namePrefix) ->processRoutesGroup($stub, $input) ->replaceRouteIdClause($stub, $this->getRouteIdClause($input->withoutRouteClause)) @@ -89,7 +88,7 @@ protected function getControllersNamespace($controllnerName, $controllerDirector { $controllerPath = Config::getControllersPath($controllerDirectory); - $path = Helpers::getAppNamespace($controllerDirectory, $controllerPath, $controllnerName); + $path = Helpers::getAppNamespace($controllerPath, $controllnerName); return Helpers::fixNamespace($path); }