This forum has moved to a new location and is in read-only mode. Please visit talk.octobercms.com to access the new location.

rajakhoury
rajakhoury

Hi, I have a Subscription Model with the following fields : id, account_id, membership_id, start, expire, is_active, timestamps

The User Model belongs to an UserAccount Model, the UserAccount hasOne Subscription Model : User logs in >> Check Account subscription if active or not

So, I wonder how to handle Subscription validation for those accounts that have expired, for example set is_active to false ? Maybe add a beforeFetch event to the Subscription model check if the expire date is < than current time then set is_active to false.

Is this the correct way to handle it ? What are your thoughts. Thanks!

1-1 of 1

You cannot edit posts or make replies: the forum has moved to talk.octobercms.com.