You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
What is the best approach to bypass the tenant middlewares?
Available for tenants (backoffice) ==> tenant.auth
tenant.domain.com/
tenant.domain.com/dashboard
tenant.domain.com/products/add
Available for customers of tenants ==> tenant.guest
tenant.domain.com/form-to-some-guest-logic
Available for everyone without a scope/tenant middleware
domain.com/
domain.com/register (logic to let visitors create themself as tenant)
==> This doesn't workt at this moment. As soon as I define a Route::get('/', ...) all visitors, subdomain or not will return to the domain.com/ endpoint. And it should deffer based on when there is an tenant-subdomain or not.
The text was updated successfully, but these errors were encountered:
How does your routes file look like? You should be able to bypass any tenant middleware by defining the route outside of the route group you apply the middleware on.
Route::middleware('tenant.auth')->group(function () {
// all tenant auth routes
});
Route::middleware('tenant.guest')->group(function () {
// all tenant guest routes
});
// all non tenant related routesRoute::get('/register', ...);
Hi,
What is the best approach to bypass the tenant middlewares?
Available for tenants (backoffice) ==> tenant.auth
tenant.domain.com/
tenant.domain.com/dashboard
tenant.domain.com/products/add
Available for customers of tenants ==> tenant.guest
tenant.domain.com/form-to-some-guest-logic
Available for everyone without a scope/tenant middleware
domain.com/
domain.com/register (logic to let visitors create themself as tenant)
==> This doesn't workt at this moment. As soon as I define a
Route::get('/', ...)
all visitors, subdomain or not will return to the domain.com/ endpoint. And it should deffer based on when there is an tenant-subdomain or not.The text was updated successfully, but these errors were encountered: