From: Vincent Vanwaelscappel Date: Thu, 4 Jul 2019 10:12:29 +0000 (+0200) Subject: #2843 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=f0ffe17cc3a9d6cd76375eceef64ef2a24de511f;p=cubist_cms-back.git #2843 --- diff --git a/composer.json b/composer.json index 09c2cec..3695cfa 100644 --- a/composer.json +++ b/composer.json @@ -48,7 +48,10 @@ "laravel": { "providers": [ "Cubist\\Backpack\\CubistBackpackServiceProvider" - ] + ], + "aliases": { + "Menu": "Cubist\\Backpack\\App\\CubistMenu" + } } }, "repositories": [ diff --git a/src/app/Magic/CubistMenu.php b/src/app/Magic/CubistMenu.php index 351bde0..c6e788d 100644 --- a/src/app/Magic/CubistMenu.php +++ b/src/app/Magic/CubistMenu.php @@ -9,13 +9,13 @@ class CubistMenu extends Menu { public function get($key) { - if (!self::exists($key)) { - self::makeAllMenus(); + if (!$this->exists($key)) { + $this->makeAllMenus(); } return parent::get($key); } - public static function makeAllMenus() + public function makeAllMenus() { $tree = CMSPage::getTree(); foreach ($tree as $mainKey => $main) {