hipsterjazzbo / Landlord

A simple, single database multi-tenancy solution for Laravel 5.2+
MIT License
613 stars 138 forks source link

Can i replace the tenant id ? #10

Closed ghost closed 8 years ago

ghost commented 8 years ago

In my application, i have a permissions called "elevate-tenant" that allows an user to select any tenant from the system to be associated with the registry. This permission is usually applied on admin roles.

If i call addTenant() from a middleware, i will get to replace the tenant calling addTenant() again or it will create another tenant ?

hipsterjazzbo commented 8 years ago

If you call addTenant() again with the same tenant_column, it'll replace it, yes.