Example #1
0
 /**
  * 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');
     }
 }
Example #2
0
 /**
  * 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()]);
 }
Example #3
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return view('order', ['items' => MenuItem::all()]);
 }
Example #4
0
 /**
  * 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()]);
 }