abterphp /
website
| 1 | <?php |
||
| 2 | |||
| 3 | declare(strict_types=1); |
||
| 4 | |||
| 5 | use AbterPhp\Admin\Http\Middleware\Authentication; |
||
| 6 | use AbterPhp\Admin\Http\Middleware\Authorization; |
||
| 7 | use AbterPhp\Admin\Http\Middleware\LastGridPage; |
||
| 8 | use AbterPhp\Framework\Authorization\Constant\Role; |
||
| 9 | use AbterPhp\Website\Constant\Routes; |
||
| 10 | use Opulence\Routing\Router; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * ---------------------------------------------------------- |
||
| 14 | * Create all of the routes for the HTTP kernel |
||
| 15 | * ---------------------------------------------------------- |
||
| 16 | * |
||
| 17 | * @var Router $router |
||
| 18 | */ |
||
| 19 | $router->group( |
||
| 20 | ['controllerNamespace' => 'AbterPhp\Website\Http\Controllers'], |
||
| 21 | function (Router $router) { |
||
| 22 | /** @see \AbterPhp\Website\Http\Controllers\Website\Index::homePage() */ |
||
| 23 | $router->get(Routes::PATH_HOME, 'Website\Index@homePage', [OPTION_NAME => Routes::ROUTE_HOME]); |
||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||
| 24 | |||
| 25 | /** @see \AbterPhp\Website\Http\Controllers\Website\Index::otherPage() */ |
||
| 26 | $router->get( |
||
| 27 | Routes::PATH_PAGE, |
||
| 28 | 'Website\Index@otherPage', |
||
| 29 | [ |
||
| 30 | OPTION_NAME => Routes::ROUTE_PAGE_OTHER, |
||
| 31 | OPTION_VARS => [Routes::VAR_ANYTHING => '[\w\d\-]+'], |
||
|
0 ignored issues
–
show
|
|||
| 32 | ] |
||
| 33 | ); |
||
| 34 | } |
||
| 35 | ); |
||
| 36 |