Laravel memetakan output API

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;
  });
Lokesh003