6
0
Fork 0
release
李静 2022-01-05 19:07:25 +08:00
parent faca9207f4
commit a51d880d7b
3 changed files with 21 additions and 5 deletions

View File

@ -4,6 +4,9 @@ APP_KEY=
APP_DEBUG=true
APP_URL=http://localhost
ENDPOINT_API_DOMAIN=null
ENDPOINT_API_PATH=null
LOG_CHANNEL=stack
LOG_DEPRECATIONS_CHANNEL=null
LOG_LEVEL=debug

View File

@ -38,15 +38,12 @@ class RouteServiceProvider extends ServiceProvider
$this->configureRateLimiting();
$this->routes(function () {
Route::prefix('api')
Route::domain(config('endpoint.api.domain'))
->prefix(config('endpoint.api.path'))
->middleware('api')
->namespace($this->namespace)
->group(app_path('Endpoint/Api/routes.php'));
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));
Route::prefix('callback')
->namespace($this->namespace)
->group(app_path('Endpoint/Callback/routes.php'));
@ -54,6 +51,10 @@ class RouteServiceProvider extends ServiceProvider
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'));
});
}

View File

@ -0,0 +1,12 @@
<?php
return [
// API 相关配置
'api' => [
// API 访问域名
'domain' => env('ENDPOINT_API_DOMAIN'),
// API 访问路径
'path' => env('ENDPOINT_API_PATH'),
],
];