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

Conflicting routes

This commit is contained in:
Samuel Štancl 2019-08-23 22:29:04 +02:00
parent 851ec3bc9e
commit a7dd6a5c84

View file

@ -26,3 +26,9 @@ Route::middleware(InitializeTenancy::class)->group(function () {
// Route::get('/', 'HelloWorld'); // Route::get('/', 'HelloWorld');
}); });
``` ```
## Using the same routes for tenant and non-tenant parts of the application {#using-the-same-routes-for-tenant-and-non-tenant-parts-of-the-application}
The `Stancl\Tenancy\Middleware\PreventAccessFromTenantDomains` middleware makes sure 404 is returned when a user attempts to visit a web route on a tenant (non-exempt) domain.
The install command applies this middleware to the `web` group. If you want to do this for another route group, add this middleware manually to that group. You can do this in `app/Http/Kernel.php`.