public function index() { $userCount = User::count(); $articleCount = Article::count(); $tagCount = Tag::count(); $imageCount = Image::count(); return view('admin.index', compact('userCount', 'articleCount', 'imageCount', 'tagCount')); }
public function index() { $pages = \App\Page::count(); $banners = \App\Banner::count(); $coupons = \App\Coupons::count(); $posts = \App\Post::count(); $users = \App\User::count(); $images = \App\Image::count(); return view('home')->with('pages', $pages)->with('banners', $banners)->with('coupons', $coupons)->with('posts', $posts)->with('users', $users)->with('images', $images); }