From b92bea47fc318b225165a873c5d1fca24b0336b0 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 26 Feb 2020 19:01:41 +0100 Subject: [PATCH] wip #3439 --- src/app/Console/Commands/GenerateCommand.php | 4 ---- src/resources/cubistmagic/routes.stub | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) 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_ + }); -- 2.39.5