如何计算start_time和end_time时间之间
$time_all = Carbon::now()->toArray();
if ($input['type'] == 'start') {
/* $data = [
'start_time' => $time, 'contract_id' => $input['job_id'],'engineer_id' => $userid, 'type' => 'start'
];*/
$start_time = JobTimingLog::create([
'start_time' => $time, 'contract_id' => $input['job_id'],'engineer_id' => $userid, 'type' => 'start'
])->id;
$arr = array("status" => 200, "message" => "start_time Add Successfully", "data" => array('start_time' => $time, 'id' => $start_time));
} else if ($input['type'] == 'end') {
$data_end = DB::table('job_timing_logs')->where('contract_id', $input['job_id'])->where('id', $input['id'])->update(['end_time' => $time, 'type' => 'end']);
$arr = array("status" => 200, "message" => "end_time update Successfully", "data" => $times);
}
现在我想在 start_time 和 end_time 之间计算
波斯汪
慕桂英3389331