Ejemplo n.º 1
0
 /**
  * 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);
 }
Ejemplo n.º 2
0
 /**
  * Display the specified resource.
  * GET /statistics/{id}.
  *
  * @param int $id
  *
  * @return Response
  */
 public function show($society, $gid, $id)
 {
     $data['statistic'] = Statistic::with('group')->find($id);
     return View::make('statistics.show', $data);
 }