1Booking::select(['booking_date', 'pickup_datetime'])->get()
2 ->map(function ($booking) {
3 $booking->pickup_datetime = optional($booking->pickup_time)->format('d M Y, h:i A');
4 $booking->booking_date = optional($booking->created_at)->format('d M Y, h:i A');
5 return $booking;
6 });
7