From: Vincent Vanwaelscappel Date: Wed, 26 Feb 2020 18:47:52 +0000 (+0100) Subject: wip #3439 @1 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=d725fd04b2b8f75fb816cc3c263840df76eac00c;p=cubist_cms-back.git wip #3439 @1 --- diff --git a/src/app/Magic/Controllers/CubistMagicController.php b/src/app/Magic/Controllers/CubistMagicController.php index 3480c34..cd9d9b2 100644 --- a/src/app/Magic/Controllers/CubistMagicController.php +++ b/src/app/Magic/Controllers/CubistMagicController.php @@ -55,6 +55,15 @@ class CubistMagicController extends CubistCrudController ////]); /// /// +/// +/// + + + public function setupListRoutes($segment, $routeName, $controller) + { + dd($segment, $routeName, $controller); + Route::match(['get'], $routeName, $controller . '@index'); + } public function setupMediaRoutes($segment, $routeName, $controller) { @@ -72,6 +81,8 @@ class CubistMagicController extends CubistCrudController public function setup() { + parent::setup(); + if (!$this->_routeURL) { $this->_routeURL = $this->_singular; } @@ -142,6 +153,8 @@ class CubistMagicController extends CubistCrudController $this->updateFieldsFromModel($model); + $this->setupRoutes($this->_routeURL, $this->_routeURL, $this->_routeURL); + } public function updateFieldsFromModel($model = null)