Пример #1
0
 public function index()
 {
     View::share(['sideBar' => NavigatorHelper::getSideBarBE()]);
     $status = Status_orders::all(['name', 'id'])->toArray();
     $newProduct = Cd::whereIn('public_date', [Carbon::today(), Carbon::today()->subDay(3)])->count();
     $newArtist = Artist::whereIn('created_at', [Carbon::today(), Carbon::today()->subDay(3)])->count();
     $newOrder = Order::where('status', Order::PENDING)->count();
     $newCustomer = Customer::whereIn('created_at', [Carbon::today(), Carbon::today()->subDay(3)])->count();
     return view('backend.index')->with(['status' => $status, 'newProduct' => $newProduct, 'newArtist' => $newArtist, 'newOrder' => $newOrder, 'newCustomer' => $newCustomer]);
 }
Пример #2
0
 public function filterStatus()
 {
     if (is_null(Input::get('id'))) {
         Session::put('order_filter', Order::PENDING);
     }
     if (Status_orders::find(Input::get('id'))->count() == 0) {
         Session::put('order_filter', Order::PENDING);
     }
     Session::put('order_filter', Input::get('id'));
 }