Example #1
0
 public function index()
 {
     $userCount = User::count();
     $productCount = Product::count();
     $fieldCount = Field::count();
     $lastUsers = User::take(5)->get();
     $lastProducts = Product::take(5)->get();
     $lastFields = Field::take(5)->get();
     return view('backend.index', compact('userCount', 'categoryCount', 'productCount', 'lastUsers', 'lastProducts', 'fieldCount', 'lastFields'));
 }