use CarbonCarbon Carbon::parse()->parse('2022-09-20')->diffInHours(Carbon::parse()->parse('2022-09-21 10:50')); // 34
'in_time' => Carbon::now()->subHours(random_int(2, 5))->format('H:i:s'),