/** * Search for customers from phone Number * @return Customer */ public function search() { $query = Input::get('phone'); $cust = Customer::whereRaw('phoneMob = ?', array($query))->get(); $items = MenuItem::all(); if (!$cust->isEmpty()) { return view('order', compact('cust'))->withItems($items); } else { Session::flash('message', 'Customer not Found'); return Redirect::to('customers/create'); } }
/** * Display a listing of the resource. * * @return Response */ public function index() { return view('admin', ['customers' => Customer::select('id', 'name', 'phoneMob', 'address')->orderBy('name')->get(), 'items' => MenuItem::all(), 'stats' => Order::adminStats(), 'customerCount' => Customer::all()->count()]); }
/** * Display a listing of the resource. * * @return Response */ public function index() { return view('order', ['items' => MenuItem::all()]); }
/** * Display a listing of the resource. * * @return Response */ public function index() { //Returns index of menu, for general viewing //$menu = Menu::all(); return view('menu', ['items' => MenuItem::all()]); }