romegasoftware/Multitenancy

Question about this package

Closed this issue · 2 comments

Hey there!

Thanks for creating this package and providing it as open source.

I've just got a small question about it: Is this package basically only for logged in/authorized users?

I'd love to use this to provide multitenancy for non-authorized users, basically a system where there are multiple websites running on different domains or subdomains and non-authorized users can visit those domains and browse through the contents of the corresponding tenant.

There's currently one part of code that's denying this:
https://github.com/romegadigital/Multitenancy/blob/98796699b2f4766510d00c63d614fc8b1ee622e3/src/Middleware/TenantMiddleware.php#L40-L42

This snippet is triggered every single time as my users are not logged in (just regular website visitors). Would it be possible to make this optional (through a variable in the config or .env file maybe?). I could also provide a PR for this if you want.

Thank you very much!

Best wishes
Tom

Resolved in #15