Passed
Push — master ( 839713...502332 )
by Peter
04:24
created

fallback-routes.php (1 issue)

Labels
Severity
1
<?php
2
3
declare(strict_types=1);
4
5
use AbterPhp\Admin\Constant\Routes;
6
use AbterPhp\Admin\Http\Middleware\Api;
7
use Opulence\Routing\Router;
8
9
/**
10
 * ----------------------------------------------------------
11
 * Create all of the routes for the HTTP kernel
12
 * ----------------------------------------------------------
13
 *
14
 * @var Router $router
15
 */
16
$router->group(
17
    ['controllerNamespace' => 'AbterPhp\Admin\\Http\\Controllers'],
18
    function (Router $router) {
19
        $router->group(
20
            [
21
                'path'       => PATH_API,
22
                'middleware' => [
23
                    Api::class,
24
                ],
25
            ],
26
            function (Router $router) {
27
                /** @see \AbterPhp\Admin\Http\Controllers\Api\Index::notFound() */
28
                $router->any(
29
                    Routes::PATH_404,
30
                    'Api\Index@notFound',
31
                    [
32
                        OPTION_VARS => [Routes::VAR_ANYTHING => '.+'],
0 ignored issues
show
The constant OPTION_VARS was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
33
                    ]
34
                );
35
            }
36
        );
37
    }
38
);
39