From: Vincent Vanwaelscappel Date: Wed, 26 Feb 2020 18:01:41 +0000 (+0100) Subject: wip #3439 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=b92bea47fc318b225165a873c5d1fca24b0336b0;p=cubist_cms-back.git wip #3439 --- diff --git a/src/app/Console/Commands/GenerateCommand.php b/src/app/Console/Commands/GenerateCommand.php index f6f4f85..3c712f9 100644 --- a/src/app/Console/Commands/GenerateCommand.php +++ b/src/app/Console/Commands/GenerateCommand.php @@ -21,7 +21,6 @@ class GenerateCommand extends CubistCommand */ protected $description = 'Generate Controllers, Requests, Routes, migrations according to magic'; - protected $_routes = []; /** * Execute the console command. @@ -45,7 +44,6 @@ class GenerateCommand extends CubistCommand mkdir($routesDir, 0777, true); } $stub = file_get_contents(Util::getStubPath() . '/routes.stub'); - $stub = str_replace('_CUSTOM_', implode("\n ", $this->_routes), $stub); file_put_contents($routesDir . '/custom.php', $stub); } @@ -60,8 +58,6 @@ class GenerateCommand extends CubistCommand $route = $model->getOption('route', $model->getOption('name')); $controller = $model->getControllerClass(); - - $this->_routes[] = 'new \Cubist\Backpack\CubistCrudRouter(\'' . $route . '\', \'' . $controller . '\', []);'; } } diff --git a/src/resources/cubistmagic/routes.stub b/src/resources/cubistmagic/routes.stub index b6008f6..c2f7f55 100644 --- a/src/resources/cubistmagic/routes.stub +++ b/src/resources/cubistmagic/routes.stub @@ -4,5 +4,5 @@ Route::group([ 'middleware' => ['web', config('backpack.base.middleware_key', 'admin')], 'namespace' => 'App\Http\Controllers\Admin', ], function () { // custom admin routes - _CUSTOM_ + });