/** * @return \Illuminate\View\View */ public function homepage() { $page = $this->page->findHomepage(); $this->throw404IfNotFound($page); $template = $this->getTemplateForPage($page); return view($template, compact('page')); }
/** * Find the page set as homepage * * @return object */ public function findHomepage() { return $this->cache->tags($this->entityName, 'global')->remember("{$this->locale}.{$this->entityName}.findHomepage", $this->cacheTime, function () { return $this->repository->findHomepage(); }); }