1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:34:04 +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()
{
if (file_exists(base_path('routes/tenant.php'))) {
Route::middleware(['web', 'tenancy'])
->namespace($this->app['config']['tenancy.tenant_route_namespace'] ?? 'App\Http\Controllers')
->group(base_path('routes/tenant.php'));
}
$this->app->booted(function () {
if (file_exists(base_path('routes/tenant.php'))) {
Route::middleware(['web', 'tenancy'])
->namespace($this->app['config']['tenancy.tenant_route_namespace'] ?? 'App\Http\Controllers')
->group(base_path('routes/tenant.php'));
}
});
}
}