/**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $exclude = \App\EventCheckin::lists('sale_checkin_id');
     $ticketsales = \App\Sale::where('created_at', '>', \Carbon::parse('1/31/2016'))->whereNotIn('cart_id', $exclude)->with('cartsBySale', 'cartsBySale.product')->get();
     $checkedin = \App\Sale::where('created_at', '>', \Carbon::parse('1/31/2016'))->WhereIn('cart_id', $exclude)->with('cartsBySale', 'cartsBySale.product')->get();
     return view('orders.index', compact('ticketsales', 'checkedin'));
 }
示例#2
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  Request  $request
  * @return Response
  */
 public function eventCheckin(Request $request)
 {
     \App\EventCheckin::create($request->except('_token'));
     return redirect()->back();
 }