This commit is contained in:
pbao9
2026-02-10 17:27:10 +07:00
parent 3ece85430c
commit a36802bd82
8 changed files with 208 additions and 126 deletions
+10 -2
View File
@@ -38,11 +38,19 @@ class RouteServiceProvider extends ServiceProvider
$this->configureRateLimiting();
$this->routes(function () {
Route::domain('api-agency.tgs.com.vn')
->middleware('api')
// 1. Agency API (Domain riêng, dùng routes/client.php)
Route::domain('api-agency.tgs.com.vn.test')
->middleware(['api', 'json.response'])
->namespace($this->namespace)
->group(base_path('routes/client.php'));
// 2. System API (Dùng cho portal.test/api/..., dùng routes/api.php)
Route::prefix('api')
->middleware(['api', 'json.response'])
->namespace($this->namespace)
->group(base_path('routes/api.php'));
// 3. Web & Admin routes
Route::middleware('web')
->namespace($this->namespace)
->group(base_path('routes/web.php'));