Get user subscription limits

Get user subscription limits

Laraship QuestionsCategory: TechnicalGet user subscription limits
harter patrick asked 4 weeks ago
I have a plan with a feature called ‘cards’ that is set to type quantity.
How do I get this value based on the current user? For example, if the current user is subscribed to the ‘Silver’ plan that has a ‘cards’ quantity of ‘5’, how do I get that value so I can use it?
Thanks
1 Answers
laraship Staff answered 4 weeks ago
Hello,
You can use the following:

$feature = $activeSubscription->plan->features()->where('feature_id', $productsCountFeatureId)->first();
$value = $productsCountFeature->pivot->value;

 

matt
replied 3 weeks ago

Thank you!

70% OFF

No Minimum, No Exceptions
 
GO TO STORE
close-link