1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 01:14:03 +00:00

Register tenant routes after other SPs are executed

This commit is contained in:
Samuel Štancl 2019-11-05 23:23:54 +01:00
parent 0616e608aa
commit 7a6338908c

View file

@ -11,10 +11,12 @@ class TenantRouteServiceProvider extends RouteServiceProvider
{ {
public function map() public function map()
{ {
if (file_exists(base_path('routes/tenant.php'))) { $this->app->booted(function () {
Route::middleware(['web', 'tenancy']) if (file_exists(base_path('routes/tenant.php'))) {
->namespace($this->app['config']['tenancy.tenant_route_namespace'] ?? 'App\Http\Controllers') Route::middleware(['web', 'tenancy'])
->group(base_path('routes/tenant.php')); ->namespace($this->app['config']['tenancy.tenant_route_namespace'] ?? 'App\Http\Controllers')
} ->group(base_path('routes/tenant.php'));
}
});
} }
} }