Persist Tenant

Was trying to see if there is a way to persist the current tenant in the database on "tenant switch". Similar to how Laravel Jetstream does. Jetstream stores the current team to the Users table as 'current_team_id' and would be nice to do that,
Solution:
I found my answer. I found the undocumented 'TenantSet' event. So created a listener when this event is triggered and store the value in DB after the change.
Jump to solution
1 Reply
Solution
julianwayu
julianwayu14mo ago
I found my answer. I found the undocumented 'TenantSet' event. So created a listener when this event is triggered and store the value in DB after the change.

Did you find this page helpful?