From a7dd6a5c84294c42199139989eb3b7e39ab38029 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Fri, 23 Aug 2019 22:29:04 +0200 Subject: [PATCH] Conflicting routes --- source/docs/tenant-routes.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/docs/tenant-routes.md b/source/docs/tenant-routes.md index 11a46f28..a9041ecd 100644 --- a/source/docs/tenant-routes.md +++ b/source/docs/tenant-routes.md @@ -25,4 +25,10 @@ use Stancl\Tenancy\Middleware\InitializeTenancy; Route::middleware(InitializeTenancy::class)->group(function () { // Route::get('/', 'HelloWorld'); }); -``` \ No newline at end of file +``` + +## 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`. \ No newline at end of file