GCTC-NTGC /
TalentCloud
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace App\Providers; |
||||
| 4 | |||||
| 5 | use Illuminate\Support\Facades\Route; |
||||
| 6 | use Illuminate\Foundation\Support\Providers\RouteServiceProvider as ServiceProvider; |
||||
| 7 | use Mcamara\LaravelLocalization\Facades\LaravelLocalization; |
||||
| 8 | |||||
| 9 | class RouteServiceProvider extends ServiceProvider |
||||
| 10 | { |
||||
| 11 | use \Mcamara\LaravelLocalization\Traits\LoadsTranslatedCachedRoutes; |
||||
| 12 | |||||
| 13 | /** |
||||
| 14 | * This namespace is applied to your controller routes. |
||||
| 15 | * |
||||
| 16 | * In addition, it is set as the URL generator's root namespace. |
||||
| 17 | * |
||||
| 18 | * @var string |
||||
| 19 | */ |
||||
| 20 | protected $namespace = 'App\Http\Controllers'; |
||||
| 21 | |||||
| 22 | /** |
||||
| 23 | * Define your route model bindings, pattern filters, etc. |
||||
| 24 | * |
||||
| 25 | * @return void |
||||
| 26 | */ |
||||
| 27 | 102 | public function boot() |
|||
| 28 | { |
||||
| 29 | |||||
| 30 | parent::boot(); |
||||
| 31 | 102 | } |
|||
| 32 | 102 | ||||
| 33 | /** |
||||
| 34 | * Define the routes for the application. |
||||
| 35 | * |
||||
| 36 | * @return void |
||||
| 37 | */ |
||||
| 38 | public function map() |
||||
| 39 | 102 | { |
|||
| 40 | $this->mapApiRoutes(); |
||||
| 41 | 102 | ||||
| 42 | $this->mapWebRoutes(); |
||||
| 43 | 102 | } |
|||
| 44 | |||||
| 45 | /** |
||||
| 46 | 102 | * Define the "web" routes for the application. |
|||
| 47 | * |
||||
| 48 | * These routes all receive session state, CSRF protection, etc. |
||||
| 49 | * |
||||
| 50 | * @return void |
||||
| 51 | */ |
||||
| 52 | protected function mapWebRoutes() |
||||
| 53 | { |
||||
| 54 | Route::middleware('web') |
||||
| 55 | 102 | ->namespace($this->namespace) |
|||
| 56 | ->group(base_path('routes/web.php')); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 57 | 102 | } |
|||
| 58 | 102 | ||||
| 59 | 102 | /** |
|||
| 60 | 102 | * Define the "api" routes for the application. |
|||
| 61 | * |
||||
| 62 | * These routes are typically stateless. |
||||
| 63 | * |
||||
| 64 | * @return void |
||||
| 65 | */ |
||||
| 66 | protected function mapApiRoutes() |
||||
| 67 | { |
||||
| 68 | Route::prefix('api') |
||||
| 69 | 102 | ->middleware('api') |
|||
| 70 | ->namespace($this->namespace) |
||||
| 71 | 102 | ->group(base_path('routes/api.php')); |
|||
|
0 ignored issues
–
show
The function
base_path was not found. Maybe you did not declare it correctly or list all dependencies?
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
Loading history...
|
|||||
| 72 | 102 | } |
|||
| 73 | } |
||||
| 74 |