public function handle() { $activeTheme = Theme::getActive(); Menu::handler('featured')->hydrate(function () { $pages = Content::InPrint()->IsFeatured()->orderBy('order')->get(); return $pages; }, function ($children, $item) { if ($item->depth < 1) { $children->add($item->slug, $item->translate(Config::get('app.locale'))->title, Menu::items($item->as)); } }); return Theme::View($activeTheme . '::' . 'widgets.featured'); }
public function handle() { $activeTheme = Theme::getActive(); $pages = Content::InPrint()->orderBy('order')->get(); if (count($pages)) { Menu::handler('top')->hydrate(function () { $pages = Content::InPrint()->NotFeatured()->NotTimed()->orderBy('order')->get(); return $pages; }, function ($children, $item) { // if($item->depth > 0) { $children->add($item->slug, $item->translate(App::getLocale())->title, Menu::items($item->as)); // } }); return Theme::View($activeTheme . '::' . 'widgets.navigation_menu'); } }
public function handle() { $activeTheme = Theme::getActive(); $pages = Cache::get('accesspoints', null); //dd($pages); if ($pages == null) { $pages = Cache::rememberForever('accesspoints', function () { return Content::InPrint()->IsAccessPoint()->orderBy('order')->get(); }); } if (count($pages)) { Menu::handler('accesspoint')->hydrate(function () { // $pages = Content::IsAccessPoint()->orderBy('order')->get(); $pages = Cache::get('accesspoints'); //dd($pages); return $pages; }, function ($children, $item) { if ($item->depth < 1) { $children->add($item->slug, $item->translate(Config::get('app.locale'))->title, Menu::items($item->as)); } }); return Theme::View($activeTheme . '::' . 'widgets.accesspoints'); } }