I've done something similar using the Pennant class based approach and it works really well in production.
Is Pennant a good idea to apply restrictions according to a chosen plan ?
Hello,
I have to apply restrictions according to the plan chosen by the client.
I have stored the stripe product and price id and I let the superadmin store restrictions in the database according to the product and price id.
Now I want to apply these restrictions.
First I just wanted to load these restrictions in variables available in all the project (for example via a configuration file, I think that it's possible to declare some variables dynamically in a configuration file) and simply use these variables where I need them (views, database query, ...).
I have seen the Pennant package and I'd like to know if it would be a good idea to use it or if it's better for me to load and use the restrictions in some variables.
Here are some examples for the restrictions :
-
number of months to see the history
-
available roles
Thanks for your help.
V
Please or to participate in this conversation.