Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

larpajd12's avatar

how to set expiry date for user subscription?

When a user becomes a premium member, how do you automatically set an expiry date for that user to become a basic member

0 likes
2 replies
bobbybouwmann's avatar

Well that completely depends on your application. It's pretty hard to push you in the right direction without much information...

If you have a paid subscription you also need to cancel their payments. However if you just set a date on the user object or subscription object and check on that date you should be fine as well. You can also run a cronjob to automatically turn these subscriptions into inactive for example when they reach that date.

shez1983's avatar

when user becomes a premium member, you will know what package they subscribed to so you can set the expiry date accordingly.

if you are using stripe/braintree then try using CASHIER (theres laracast videos on it too) that makes it all very easy to work with subscription model

Please or to participate in this conversation.