|
@@ -51,12 +51,11 @@ class RouteServiceProvider extends ServiceProvider
|
|
|
*/
|
|
|
protected function mapWebRoutes()
|
|
|
{
|
|
|
- Route::group([
|
|
|
- 'middleware' => 'web',
|
|
|
- 'namespace' => $this->namespace,
|
|
|
- ], function ($router) {
|
|
|
- require base_path('routes/web.php');
|
|
|
- });
|
|
|
+ Route::middleware('web')
|
|
|
+ ->namespace($this->namespace)
|
|
|
+ ->group(function ($router) {
|
|
|
+ require base_path('routes/web.php');
|
|
|
+ });
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -68,12 +67,11 @@ class RouteServiceProvider extends ServiceProvider
|
|
|
*/
|
|
|
protected function mapApiRoutes()
|
|
|
{
|
|
|
- Route::group([
|
|
|
- 'middleware' => 'api',
|
|
|
- 'namespace' => $this->namespace,
|
|
|
- 'prefix' => 'api',
|
|
|
- ], function ($router) {
|
|
|
- require base_path('routes/api.php');
|
|
|
- });
|
|
|
+ Route::prefix('api')
|
|
|
+ ->middleware('api')
|
|
|
+ ->namespace($this->namespace)
|
|
|
+ ->group(function ($router) {
|
|
|
+ require base_path('routes/api.php');
|
|
|
+ });
|
|
|
}
|
|
|
}
|