📅  最后修改于: 2022-03-11 14:54:37.105000             🧑  作者: Mango
Booking::select(['booking_date', 'pickup_datetime'])->get()
->map(function ($booking) {
$booking->pickup_datetime = optional($booking->pickup_time)->format('d M Y, h:i A');
$booking->booking_date = optional($booking->created_at)->format('d M Y, h:i A');
return $booking;
});