Does anyone use Laravel Pennant to store user settings? For example, I have a multi-tenant app and a user can belong to multiple tenants. I want to store which tenant is currently the user's active tenant. Does that make sense or is that best left out of Pennant?
Back
•
I'd advise against this. Pennant's data is really only a cache of the current state of its rules and can be purged.
For your case I'd recommend a simple foreignId on your users table such as current_tenant_id
•
In response to @simonhamp
Agree with Simon. If the user can control the settings, like they can update their options via a UI, it probably does not belong in Pennant.