Let's say we have a simple SAAS that offers two types of plans. For example, in the cheapest plan you can create 20 lists at maximum and in the next plan you can create up to 50 lists. This is just one feature of the pricing model. Assuming the pricing model is based on 4-5 different features for each plan, what would be a good practice to check and enforce those restrictions?
I guess, the (messy) way would be to add a bunch of 'ifs' in different points, eg: if $user->plan->limitReached, do this etc.
Maybe another approach would be to throw some kind of events on user actions and handle the checks in a more 'centralized' way? What are your thoughts on this scenario? Any suggestions would be appreciated. Thank you
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire