app/Services/Helper.php
/***
     * Duration between start and in time
     */
Duration between start and in time
Duration between start and in time
public static function calculateAttendanceDuration($finishTime, $startTime)
    {
        $startTime = Carbon::parse($startTime);
        $finishTime = Carbon::parse($finishTime);
        $totalDuration = $finishTime->diff($startTime)->format('%H:%i:%s');;
        return $totalDuration;
    }
public static function calculateAttendanceDuration ( $ finishTime , $ startTime ) { $ startTime = Carbon :: parse ( $ startTime ) ; $ finishTime = Carbon :: parse ( $ finishTime ) ; $ totalDuration = $ finishTime -> diff ( $ startTime ) -> format ( '%H:%i:%s' ) ; ; return $ totalDuration ; }
Duration between start and in time
Duration between start and in time