1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 17:24:03 +00:00

defer tenant route registration in TSP stub

This commit is contained in:
Samuel Štancl 2024-04-14 10:12:18 +02:00 committed by GitHub
parent d6d991ced6
commit 4dab0c1870
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -120,10 +120,12 @@ class TenancyServiceProvider extends ServiceProvider
protected function mapRoutes() protected function mapRoutes()
{ {
if (file_exists(base_path('routes/tenant.php'))) { $this->app->booted(function () {
Route::namespace(static::$controllerNamespace) if (file_exists(base_path('routes/tenant.php'))) {
->group(base_path('routes/tenant.php')); Route::namespace(static::$controllerNamespace)
} ->group(base_path('routes/tenant.php'));
}
});
} }
protected function makeTenancyMiddlewareHighestPriority() protected function makeTenancyMiddlewareHighestPriority()