1$start_time = \Carbon\Carbon::parse($request->input('start_time'));
2$finish_time = \Carbon\Carbon::parse($request->input('finish_time'));
3
4$price = $request->input('price');
5
6$result = $start_time->diffInDays($finish_time, false);
7
8if ($result < 0) {
9 $price = $price * $result;
10}