1 | <?php namespace Modules\Page\Http\Controllers; |
||
7 | class PublicController extends BasePublicController |
||
8 | { |
||
9 | /** |
||
10 | * @var PageRepository |
||
11 | */ |
||
12 | private $page; |
||
13 | /** |
||
14 | * @var Application |
||
15 | */ |
||
16 | private $app; |
||
17 | |||
18 | public function __construct(PageRepository $page, Application $app) |
||
24 | |||
25 | /** |
||
26 | * @param $slug |
||
27 | * @return \Illuminate\View\View |
||
28 | */ |
||
29 | public function uri($slug) |
||
39 | |||
40 | /** |
||
41 | * @return \Illuminate\View\View |
||
42 | */ |
||
43 | public function homepage() |
||
53 | |||
54 | /** |
||
55 | * Return the template for the given page |
||
56 | * or the default template if none found |
||
57 | * @param $page |
||
58 | * @return string |
||
59 | */ |
||
60 | private function getTemplateForPage($page) |
||
64 | |||
65 | /** |
||
66 | * Throw a 404 error page if the given page is not found |
||
67 | * @param $page |
||
68 | */ |
||
69 | private function throw404IfNotFound($page) |
||
75 | } |
||
76 |