Ejemplo n.º 1
0
 /**
  * Create a new event instance.
  *
  * @return void
  */
 public function __construct()
 {
     $this->created = Orders::where('status', '=', '1')->count();
     $this->printed = Orders::where('status', '=', '2')->count();
     $this->cooked = Orders::where('status', '=', '3')->count();
     $this->finished = Orders::where('status', '=', '4')->count();
 }
Ejemplo n.º 2
0
 /**
  * @return \Illuminate\View\View
  */
 public function index()
 {
     // 		event(new OrderReceipt(Orders::findOrFail(9)));
     $created = Orders::where('status', '=', '1')->count();
     $printed = Orders::where('status', '=', '2')->count();
     // 		event(new DashboardOrderEvent(Orders::findOrFail(9)));
     // 		event(new OrderReceipt());
     // 		event(new OrderReceipt());
     return view('backend.pages.dashboard')->withCreated(Orders::where('status', '=', '1')->count())->withPrinted(Orders::where('status', '=', '2')->count())->withCooked(Orders::where('status', '=', '3')->count())->withFinished(Orders::where('status', '=', '4')->count());
 }
Ejemplo n.º 3
0
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function create()
 {
     //     	$message = trans('front_home.qorder_intro');
     //     	return redirect()->route('home.quickorder',[$message]);
     //     	return redirect('home/quickorder')->with('regist', true);
     $order = Orders::findOrFail(133);
     dd($this->user);
     if (!Auth::guest()) {
         $this->user->attachorder($order);
     }
 }
Ejemplo n.º 4
0
 /**
  * Search the specified order from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function search(Request $request)
 {
     $tab = "all";
     $name = $request->input('table_search');
     $orders = Orders::where('name', 'LIKE', '%' . $name . '%')->paginate(10);
     return view('backend.pages.order.index')->withOrders($orders)->withTab($tab);
 }