zfdeveloper
3 months ago

know if the limit has reached for plan

Posted 3 months ago by zfdeveloper

I have a system with User, City, Subscription and Plan. The Subscription is the glue (pivot) between the User and Plan. An User belongs to a City. Plan has a field that is called limit to limit the total of users that can subscribe to that plan, but I wanted to make it per city.

How can I know if the plan reached the subscription limit based on the city of the user that I want to subscribe?

Please sign in or create an account to participate in this conversation.