路由优化
parent
57b9163956
commit
fd2c42346f
|
|
@ -39,22 +39,26 @@ class RouteServiceProvider extends ServiceProvider
|
|||
|
||||
$this->routes(function () {
|
||||
Route::domain(config('endpoint.api.domain'))
|
||||
->prefix(config('endpoint.api.path'))
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(app_path('Endpoint/Api/routes.php'));
|
||||
->group(function () {
|
||||
Route::prefix(config('endpoint.api.path'))
|
||||
->middleware('api')
|
||||
->namespace($this->namespace)
|
||||
->group(app_path('Endpoint/Api/routes.php'));
|
||||
|
||||
Route::prefix('callback')
|
||||
->namespace($this->namespace)
|
||||
->group(app_path('Endpoint/Callback/routes.php'));
|
||||
Route::prefix('callback')
|
||||
->namespace($this->namespace)
|
||||
->group(app_path('Endpoint/Callback/routes.php'));
|
||||
|
||||
Route::prefix('h5')
|
||||
->namespace($this->namespace)
|
||||
->group(app_path('Endpoint/Wap/routes.php'));
|
||||
Route::prefix('h5')
|
||||
->namespace($this->namespace)
|
||||
->group(app_path('Endpoint/Wap/routes.php'));
|
||||
|
||||
Route::middleware('web')
|
||||
->namespace($this->namespace)
|
||||
->group(base_path('routes/web.php'));
|
||||
Route::fallback(function () {
|
||||
return response()->json([
|
||||
'data' => 'ok',
|
||||
]);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue