I have two fields beginning time and endingtime in a Mysql database. I want to calculate a duration inside a view in Laravel. So I wrote :
{{ $date1=date('G:i',strtotime($timeSlot->beginningTime)) }}
{{ $date2=date('G:i',strtotime($timeSlot->endingTime)) }}
{{ $date2-$date1 }}
My issue is : the difference gives me only hours difference without minutes...
Thanks for your help