i am updating a user db value in days how to apply it in seconds here is my days code after 7 days each customer's visit_clear set to 0 i want it shoud set 0 after 10 seconds how i can do it?
public function handle()
{
$dayAgo = 7; // Days ago
$dayToCheck = \Carbon\Carbon::now()->subDays($dayAgo)->format('Y-m-d');
Customer::whereDate('visit_date', '<=', $dayToCheck)
->update([
'visit_clear' => 0
]);
}
this code is in console in laravel
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire