Esempio n. 1
0
 /**
  * @return \Illuminate\View\View
  */
 public function homepage()
 {
     $page = $this->page->findHomepage();
     $this->throw404IfNotFound($page);
     $template = $this->getTemplateForPage($page);
     return view($template, compact('page'));
 }
Esempio n. 2
0
 /**
  * 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();
     });
 }