/**
  * 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 viewpickup($id)
 {
     $pickup = Pickup::find($id);
     $pickup->items = json_decode($pickup->items);
     return view('employee.pickup', ['pickup' => $pickup, 'user' => Auth::user()]);
 }