| Total Complexity | 5 | 
| Total Lines | 75 | 
| Duplicated Lines | 0 % | 
| Changes | 0 | ||
| 1 | <?php | ||
| 8 | class RouteServiceProvider extends ServiceProvider | ||
| 9 | { | ||
| 10 | /** | ||
| 11 | * The root namespace to assume when generating URLs to actions. | ||
| 12 | * | ||
| 13 | * @var string | ||
| 14 | */ | ||
| 15 | protected $namespace = 'Modules\Example\Http\Controllers'; | ||
| 16 | |||
| 17 | /** | ||
| 18 | * Called before routes are registered. | ||
| 19 | * | ||
| 20 | * Register any model bindings or pattern based filters. | ||
| 21 | * | ||
| 22 | * @return void | ||
| 23 | */ | ||
| 24 | public function boot() | ||
| 25 |     { | ||
| 26 | parent::boot(); | ||
| 27 | } | ||
| 28 | |||
| 29 | /** | ||
| 30 | * Define the routes for the application. | ||
| 31 | * | ||
| 32 | * @return void | ||
| 33 | */ | ||
| 34 | public function map() | ||
| 41 | } | ||
| 42 | |||
| 43 | /** | ||
| 44 | * Define the "web" routes for the application. | ||
| 45 | * | ||
| 46 | * These routes all receive session state, CSRF protection, etc. | ||
| 47 | * | ||
| 48 | * @return void | ||
| 49 | */ | ||
| 50 | protected function mapWebRoutes() | ||
| 51 |     { | ||
| 52 |         Route::middleware('web') | ||
| 53 | ->namespace($this->namespace) | ||
| 54 | ->group(__DIR__.'/../Routes/web.php'); | ||
| 55 | } | ||
| 56 | |||
| 57 | /** | ||
| 58 | * Define the "api" routes for the application. | ||
| 59 | * | ||
| 60 | * These routes are typically stateless. | ||
| 61 | * | ||
| 62 | * @return void | ||
| 63 | */ | ||
| 64 | protected function mapApiRoutes() | ||
| 65 |     { | ||
| 66 |         Route::prefix('api') | ||
| 67 |              ->middleware('api') | ||
| 68 | ->namespace($this->namespace) | ||
| 69 | ->group(__DIR__.'/../Routes/api.php'); | ||
| 70 | } | ||
| 71 | |||
| 72 | /** | ||
| 73 | * Define the "console" routes for the application. | ||
| 74 | * | ||
| 75 | * These routes are console commands. | ||
| 76 | * | ||
| 77 | * @return void | ||
| 78 | */ | ||
| 79 | protected function mapCommandRoutes() | ||
| 83 | } | ||
| 84 | } | ||
| 85 |