menuId = $menuId; } public function menus() { return Cache::tags(['mega_menu', 'menu_items', 'pages', 'categories']) ->rememberForever(md5("mega_menu.{$this->menuId}:" . locale()), function () { return $this->getMenus()->map(function ($menu) { return new Menu($menu); }); }); } private function getMenus() { return MenuModel::for($this->menuId)->where('menu_id', $this->menuId); } }