| Total Complexity | 4 |
| Total Lines | 60 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 8 | class RouteServiceProvider extends ServiceProvider |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * This namespace is applied to your controller routes. |
||
| 12 | * |
||
| 13 | * In addition, it is set as the URL generator's root namespace. |
||
| 14 | * |
||
| 15 | * @var string |
||
| 16 | */ |
||
| 17 | protected $namespace = 'App\Http\Controllers'; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Define the routes for the application. |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public function map() |
||
| 25 | { |
||
| 26 | $this->mapApiRoutes(); |
||
| 27 | |||
| 28 | $this->mapWebRoutes(); |
||
| 29 | |||
| 30 | $this->mapAdminRoutes(); |
||
| 31 | } |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Define the "api" routes for the application. |
||
| 35 | * |
||
| 36 | * These routes are typically stateless. |
||
| 37 | * |
||
| 38 | * @return void |
||
| 39 | */ |
||
| 40 | protected function mapApiRoutes() |
||
| 41 | { |
||
| 42 | Route::prefix('judge') |
||
| 43 | // ->middleware('judge') |
||
| 44 | ->namespace($this->namespace) |
||
| 45 | ->group(base_path('routes/judge.php')); |
||
| 46 | } |
||
| 47 | |||
| 48 | /** |
||
| 49 | * Define the "web" routes for the application. |
||
| 50 | * |
||
| 51 | * These routes all receive session state, CSRF protection, etc. |
||
| 52 | * |
||
| 53 | * @return void |
||
| 54 | */ |
||
| 55 | protected function mapWebRoutes() |
||
| 56 | { |
||
| 57 | Route::middleware('web') |
||
| 58 | ->namespace($this->namespace) |
||
| 59 | ->group(base_path('routes/web.php')); |
||
| 60 | } |
||
| 61 | |||
| 62 | private function mapAdminRoutes() |
||
| 68 | } |
||
| 69 | } |
||
| 70 |