/** * Retrieve all Completed and Ongoing orders and send it to the view. * * @author Sinthujan G. * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function ViewAOrders() { $order = Orders::all(); $event = DB::table('orders')->join('users', 'users.email', '=', 'orders.custID')->select('users.*', 'orders.DueDate AS start', 'orders.DueDate AS end', 'orders.ordID AS id', 'orders.ordDate', 'DueDate AS chkDate', 'orders.status AS title')->get(); $calendar = $this->ViewCal($event); return view('pages/Artist/artOrders')->with('order', $order)->with('calendar', $calendar); }
public function getDashboard() { if (Auth::user()->email == '*****@*****.**') { $countUsers = count(User::all()); $countProducts = count(Products::all()); $countOrders = count(Orders::all()); return view('admin.dashboard')->with('countUsers', $countUsers)->with('countProducts', $countProducts)->with('countOrders', $countOrders); } return redirect('/'); }
public function getlist() { $order_list = Orders::all(); return Datatables::of($order_list)->addColumn('action', 'action here')->addColumn('fullname', function ($order_list) { $fullname = $order_list->firstname . " " . $order_list->lastname; return $fullname; })->addColumn('address', function ($order_list) { $address = $order_list->street1 . ", " . $order_list->province . ", " . $order_list->sity; return $address; })->make(true); }
public function ViewAOrders() { $order = Orders::all(); // $order = DB::table('itemorders') // ->join('orders','itemorders.ordID','=','orders.ordID') // ->join('items','itemorders.itID','items.idID') // ->join('register','itemorders.CustID','register.UserName') // ->select('orders.*','itemorders.*')->get(); // return $order; return view('pages/Artist/artOrders')->with('order', $order); //return 'hello'; }
/** * Display the specified resource. * * @param int $id * @return Response */ public function show() { //return view('user.profile', ['user' => User::findOrFail($id)]); if (\Auth::check()) { $id = \Auth::user()->id; $orders = Orders::where('user_id', '=', "1")->get(); $orders = Orders::all(); //$one = Orders::where('user_id', '=', $id)->first(); //return view('orders', compact('orders')); //return $one; return view('orders', ['orders' => $orders, 'id' => $id]); // return view('orders', ['orders' => $orders,'id' => $id ]); } }
public function ordercount() { $orders = Orders::all(); return count($orders); }
public function index() { $orders = Orders::all(); return view('admin.order.index', compact('orders')); }
public function ViewCal() { $order = Orders::all(); return view('pages/Artist/ordCalendar')->with('order', json_encode($order)); }
/** * Retrieve all Completed and Ongoing orders and send it to the view. * * @author Sinthujan G. * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View */ public function ViewAOrders() { $order = Orders::all(); $calendar = $this->ViewOrCal(); return view('pages/Artist/artOrders')->with('order', $order)->with('calendar', $calendar); }