Changeset View
Changeset View
Standalone View
Standalone View
src/app/Providers/RouteServiceProvider.php
Show First 20 Lines • Show All 59 Lines • ▼ Show 20 Lines | class RouteServiceProvider extends ServiceProvider | ||||
* Define the "api" routes for the application. | * Define the "api" routes for the application. | ||||
* | * | ||||
* These routes are typically stateless. | * These routes are typically stateless. | ||||
* | * | ||||
* @return void | * @return void | ||||
*/ | */ | ||||
protected function mapApiRoutes() | protected function mapApiRoutes() | ||||
{ | { | ||||
Route::prefix('api') | // Note: We removed the prefix from here, to have more control | ||||
->middleware('api') | // over it in routes/api.php | ||||
Route::middleware('api') | |||||
->namespace($this->namespace) | ->namespace($this->namespace) | ||||
->group(base_path('routes/api.php')); | ->group(base_path('routes/api.php')); | ||||
} | } | ||||
} | } |