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:Jump to 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.
1 Reply
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.