public function admin()
 {
     $photos = DB::table('media')->get();
     $home = DB::table('home_page')->first();
     $bookings = Booking::all();
     return view('pages.admin', array("content" => $home, "photos" => $photos, 'bookings' => $bookings));
 }
 public function index()
 {
     $apartments = Apartment::all();
     $bookings = Booking::all();
     foreach ($bookings as $booking) {
         $booking->apartmentName = Apartment::find($booking->apartment_id)->name;
     }
     return view('admin.index', compact('apartments', 'bookings'));
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::all();
     $bookings = Booking::all();
     $pickups = Pickup::all();
     $ids = Pickup::lists('booking_id');
     $delayed = DB::table('bookings')->whereNotIn('id', $ids)->get();
     //bookings which are not in pickups
     $date = date('Y-m-d');
     return view('stockmaster.index', ['user' => Auth::user(), 'items' => $items, 'delayed' => $delayed, 'bookings' => $bookings, 'pickups' => $pickups, 'date' => $date]);
 }
 public function index()
 {
     $items = Item::all();
     $bookings = Booking::all();
     $date = date('Y-m-d');
     $ids = Pickup::lists('booking_id');
     $tobedone = DB::table('bookings')->whereNotIn('id', $ids)->get();
     //bookings which are not in pickups
     $notify = DB::table('bookings')->whereNotIn('id', $ids)->count();
     return view('employee', ['user' => Auth::user(), 'items' => $items, 'bookings' => $bookings, 'date' => $date, 'tobedone' => $tobedone, 'notify' => $notify]);
 }
 private function returnToUserBooking($userID)
 {
     $bokings = \App\Booking::all();
     $userBookings;
     foreach ($bokings as $b) {
         if ($b::userID == $booking::userID) {
             $userBookings::add($b);
         }
     }
     return view('customerLogin', ['bookings' => $userBookings]);
     // TODO Corect view
 }
 public function getAdminTrips()
 {
     $trips = Trip::all();
     $bookings = Booking::all();
     return view('adminOverview', ['trips' => $trips, 'bookings' => $bookings]);
 }
 /**
  * Grab all bookings
  *
  * @return response
  */
 public function all()
 {
     $bookings = Booking::all();
     return response()->json($bookings);
 }
 public function getAllDetails()
 {
     return Booking::all();
 }
 public function displayBookings()
 {
     $bookings = Booking::all();
     return $bookings;
 }
 public function listBooking()
 {
     $data['title'] = "LIST BOOKING";
     $data['booking'] = Booking::all();
     return view('default/listBooking', $data);
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $booking = Booking::all();
     return view('booking.index', compact('booking'));
 }