public function edit($booking_id) { $booking = Booking::with('comment.comment_type', 'comment.role.user', 'comment.role.role_type', 'change.change_type', 'change.user', 'car_type', 'role.user', 'role.role_type', 'income.income_type', 'outcome.outcome_type', 'route_point.location', 'route_point.sub_location', 'route_point.address')->with(array('route_point' => function ($query) { $query->orderBy('order', 'ASC'); }))->findOrFail($booking_id); $car_types = Car_type::get(); $role_types = Role_type::get(); $income_types = Income_type::get(); $outcome_types = Outcome_type::get(); $locations = Location::get(); $sub_locations = Sub_location::get(); $addresses = Address::get(); JavaScript::put(['addresses' => $addresses, 'booking' => $booking, 'car_types' => $car_types, 'income_types' => $income_types, 'locations' => $locations, 'outcome_types' => $outcome_types, 'role_types' => $role_types, 'sub_locations' => $sub_locations, 'csrf_token' => csrf_token()]); return view('booking.edit'); }
/** * Show a particular booking * * @return response */ public function showBooking($booking_id) { $booking = Booking::with('category')->find($booking_id); return response()->json($booking); }
public function findByReference($reference) { return Booking::with('user')->where('booking_reference', $reference)->first(); }
public function find($id) { return Booking::with('user')->findOrFail($id); }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show($id) { return Booking::with('peralatan')->get()->find($id); }
/** * Get all the unpaid booking. These are the upon * requests booking. */ public function notPaid() { return Booking::with('user', 'packages.tickets')->latest()->wherePaid(false)->get(); }