]> _ Git - cubist_cms-back.git/commitdiff
wip #3439
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Feb 2020 18:01:41 +0000 (19:01 +0100)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Wed, 26 Feb 2020 18:01:41 +0000 (19:01 +0100)
src/app/Console/Commands/GenerateCommand.php
src/resources/cubistmagic/routes.stub

index f6f4f8516347535bedabea746f4301b73a7fc737..3c712f97ccbef7cc269d334f8f29e65b2c080b15 100644 (file)
@@ -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 . '\', []);';
     }
 }
 
index b6008f635b9c56d57f2c882c98e34c3e751303c3..c2f7f550c3729e5ec4a5b71d7ac8a500e75f99c3 100644 (file)
@@ -4,5 +4,5 @@ Route::group([
     'middleware' => ['web', config('backpack.base.middleware_key', 'admin')],
     'namespace'  => 'App\Http\Controllers\Admin',
 ], function () { // custom admin routes
-    _CUSTOM_
+
 });