app/Http/Controllers/Api/BookingController.php
/**
     * Show a listing of user bookings.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
Show a listing of user bookings.
@return \Illuminate\Contracts\Support\Renderable
Show a listing of user bookings . @return \ Illuminate \ Contracts \ Support \ Renderable
public function index()
    {
        $bookings = auth('api')->user()->load('trips', 'trips.pivot.pickup', 'trips.pivot.arrival')->trips;
        return $this->success($bookings);
    }
public function index ( ) { $ bookings = auth ( 'api' ) -> user ( ) -> load ( 'trips' , 'trips.pivot.pickup' , 'trips.pivot.arrival' ) -> trips ; return $ this -> success ( $ bookings ) ; }
Show a listing of user bookings.
Show a listing of user bookings .