From 78db6a89c8894f17f00da21b75f6c064e24778a0 Mon Sep 17 00:00:00 2001 From: Mike Alhayek Date: Thu, 24 May 2018 15:49:43 -0700 Subject: [PATCH] Fixes Bug #60 --- composer.json | 2 +- src/Commands/CreateControllerCommand.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 78135af..ae3146c 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.2.9", + "version": "v2.2.10", "keywords": [ "laravel","crud","crud generator", "laravel crud generator","laravel crud builder", diff --git a/src/Commands/CreateControllerCommand.php b/src/Commands/CreateControllerCommand.php index 6cb5f0a..b5865c0 100644 --- a/src/Commands/CreateControllerCommand.php +++ b/src/Commands/CreateControllerCommand.php @@ -552,7 +552,7 @@ protected function getModelNamespace($modelName, $modelDirectory) $modelDirectory = str_finish($modelDirectory, '\\'); } - $namespace = Helpers::getAppNamespace() . Config::getModelsPath($modelDirectory . $modelName); + $namespace = Helpers::getAppNamespace() . ltrim(Config::getModelsPath($modelDirectory . $modelName), '\\'); return rtrim(Helpers::convertSlashToBackslash($namespace), '\\'); }