| @@ 29-38 (lines=10) @@ | ||
| 26 | * @param $slug |
|
| 27 | * @return \Illuminate\View\View |
|
| 28 | */ |
|
| 29 | public function uri($slug) |
|
| 30 | { |
|
| 31 | $page = $this->page->findBySlug($slug); |
|
| 32 | ||
| 33 | $this->throw404IfNotFound($page); |
|
| 34 | ||
| 35 | $template = $this->getTemplateForPage($page); |
|
| 36 | ||
| 37 | return view($template, compact('page')); |
|
| 38 | } |
|
| 39 | ||
| 40 | /** |
|
| 41 | * @return \Illuminate\View\View |
|
| @@ 43-52 (lines=10) @@ | ||
| 40 | /** |
|
| 41 | * @return \Illuminate\View\View |
|
| 42 | */ |
|
| 43 | public function homepage() |
|
| 44 | { |
|
| 45 | $page = $this->page->findHomepage(); |
|
| 46 | ||
| 47 | $this->throw404IfNotFound($page); |
|
| 48 | ||
| 49 | $template = $this->getTemplateForPage($page); |
|
| 50 | ||
| 51 | return view($template, compact('page')); |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * Return the template for the given page |
|