-
I did search and see others with the error, but I didn't see a straightforward answer to the question: If my tenant finder class returns null (intentionally), should app('currentTenant') be bound (and set to null)? If yes, it seems I have a bug. If no, is there a way to ensure app('currentTenant') is set/available, either null or the current tenant? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Check domain column in your tenants table be sure there is no port number added to your record domain value I think should be plain domain name like tenant1.domain.local not tenant1.domain.local:123 . This was the issue on my case having same error. |
Beta Was this translation helpful? Give feedback.
-
The solution to realize if Tenant has initiated or not is this: $containerKey = config('multitenancy.current_tenant_container_key');
if (app()->has($containerKey)) {
// you are in Tenant mode (Tenant has found)
} else {
// you are in Landlord mode (No Tenant has been found)
} |
Beta Was this translation helpful? Give feedback.
Hey thank you I've just been using
app()->has('currentTenant')