public function index(ArticleRepository $article, MarketRepository $market) { $article_counts = $article->publishedCountWithCommentCount(); $user_count = \App\User::count(); $event_count = $market->currentAndFutureCount(); return view('backend.page.index', compact('article_counts', 'user_count', 'event_count')); }
public function home(MarketRepository $market, ArticleRepository $article) { $markets = $market->latest(3); $articles = $article->latest(); return view('frontend.page.index', compact('markets', 'articles')); }