Esempio n. 1
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function index()
 {
     $items = Item::where('type', 1)->count();
     $item_kits = Item::where('type', 2)->count();
     $customers = Customer::count();
     $suppliers = Supplier::count();
     $receivings = Receiving::count();
     $sales = Sale::count();
     $employees = User::count();
     return view('home')->with('items', $items)->with('item_kits', $item_kits)->with('customers', $customers)->with('suppliers', $suppliers)->with('receivings', $receivings)->with('sales', $sales)->with('employees', $employees);
 }
Esempio n. 2
0
 public function index()
 {
     $dataView = ['productsCount' => Product::count(), 'plansCount' => Plan::where('month', \Config::get('app.current_month'))->count(), 'reportsCount' => Report::where('month', \Config::get('app.current_month'))->count(), 'customersCount' => Customer::count(), 'employeesCount' => Employee::count()];
     return view('admin.index', $dataView);
 }