| Total Complexity | 7 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 9 | final class AdminPage extends BladePage implements PageContract |
||
| 10 | { |
||
| 11 | /** Not yet implemented, but could be used by the framework to ignore this when compiling */ |
||
| 12 | protected static bool $compilable = false; |
||
| 13 | |||
| 14 | public string $route; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * @inheritDoc |
||
| 18 | */ |
||
| 19 | public function __construct(string $view) |
||
| 20 | { |
||
| 21 | parent::__construct($view); |
||
| 22 | |||
| 23 | $this->route = $this->request()?->get('route', 'dashboard') ?? 'dashboard'; |
||
| 24 | } |
||
| 25 | |||
| 26 | public function getRouteKey(): string |
||
| 27 | { |
||
| 28 | return 'admin'; |
||
| 29 | } |
||
| 30 | |||
| 31 | public function navigationMenuTitle(): string |
||
| 34 | } |
||
| 35 | |||
| 36 | public function request(): ?Request |
||
| 37 | { |
||
| 38 | return isset($_SERVER['REQUEST_METHOD']) |
||
| 39 | ? Request::capture() |
||
| 40 | : null; |
||
| 41 | } |
||
| 42 | |||
| 43 | public function view(): string |
||
| 48 | } |
||
| 49 | } |
||
| 50 |