app->environment('production') || str_contains(config('app.url'), 'https')) { URL::forceScheme('https'); } // 隱含授權:讓 "super-admin" 角色擁有所有權限 \Illuminate\Support\Facades\Gate::before(function ($user, $ability) { return $user->hasRole('super-admin') ? true : null; }); // 載入房東後台路由 (只在 central domain 可用) $this->app->booted(function () { if (file_exists(base_path('routes/landlord.php'))) { Route::middleware('web')->group(base_path('routes/landlord.php')); } }); } }