I have a customer table in my database. This table contains customer information including his/her balance.
Now I want to add his/her balance after every 30 days depends on what promo or plan he/she applied
example: he applied for a plan 1599 so after every 30 days his balance must add the price of the plan he applied.
current balance = 0 after 30 days balance = 1599
How will i do this?
You can create a cron job for the same. Check the date difference for every user and if its greater than 30 days add the balance to the respective user's account.
You can do this like
date('Y-m-d')
in a variabledate('Y-m-d',strtotime("+7 day", $date))
and save this in databaseFor point 3 you may also need cron job depends on your requirement.
If still need help feel free to comment