/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(History $historyModel, Statistic $statisticModel) { $history = $historyModel->getHistory(); $statistic['products'] = $statisticModel->getCountProducts(); $statistic['providers'] = $statisticModel->getCountProviders(); $statistic['brands'] = $statisticModel->getCountBrands(); $statistic['products_GK'] = $statisticModel->getCountSitesProducts('GK'); $statistic['products_TV'] = $statisticModel->getCountSitesProducts('TV'); $statistic['products_MK'] = $statisticModel->getCountSitesProducts('MK'); $statistic['lastUpdate'] = $statisticModel->getLastUpdate(); //pr($statistic); return view('dashboard.index')->with('title', 'Главная панель')->with('history', $history)->with('statistic', $statistic); }
/** * Display a listing of the resource. * * @return Response */ public function index(History $historyModel) { $history = $historyModel->getHistory(); return view('history.index')->with('title', 'История')->with('history', $history); }