Cashier plans with quotas/limits
I'm using Cashier with Stripe and have several plans which my users can subscribe to. I'm storing these plans in a table along with quotas for certain aspects of my application - things like max number of users for their account etc.
Out of the box, Cashier only provides a list of subscriptions which are associated to a given model. The only reference to the plan is a column on the table. I would like to be able to get a plan entity with its metadata - in my case, quotas, from the subscription entity.
I'm looking for a clean way to achieve this, ideally something like:
$user->subscription('primary')->plan;
Has anyone else implemented something like this?
Please or to participate in this conversation.