vendredi 26 mai 2017

Change database field at specific time

I'm working on a laravel API and want to activate the users after registration for a month (free trial) then to deactivate them at the end of the month. The activation will be through active column in users table in MySQL db. So, for a user to be activated : active = 1 , otherwise active = 0 .

In registration method I do this : $user->active = 1;

Now, how can I make it be : active=0 automatically after a month ??



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2s5dOvx
via IFTTT

Aucun commentaire:

Enregistrer un commentaire