I am using query which is subtracting time. Problem is when it reaches to 00:00:00 it doesn't stop subtracting and it start going in negative like " - 00:20:00"
Sale::where('date','=',$current->toDateString())->where('time','<=',$current->toTimeString()) ->update(['duration' => DB::raw('DATE_SUB(duration, INTERVAL 1 MINUTE)')]);
I want to stop it on 00:00:00
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/30EKXiq
via IFTTT
Aucun commentaire:
Enregistrer un commentaire