Open JjamesS opened 7 years ago
Hi, thanks for use this package!
Currently the package is designed to work with "per tenant" configuration, so database and storage are set "per tenant".
About the "Auth::user()", you should use the middlewares to set the tenant, for auth, you can use controllers normally.
What the package does is set database connection and storage (each tenant has its own database and storage), after that Laravel behaviour is the same as without the package.
Currently, I'm working on an example for this package, I forgot to do it when I made the package available ...
PS: I use Laravel for Rest API's, using JWT, so use the native Auth should be ok too :)
I was looking at the package, I need to set config variables on the USER Connection, which I can change to TENANT, but where do I store the per user database connection details to enable the switch at runtime?
I see the trait...where would I access the Auth::user() to get the TENANT id to use?
I get: Session store not set on request.
I got it...nice work, nice and simple but flexable!