File: D:/HostingSpaces/SBogers85/equichecker.com/app/KommaApp/Kms/Dashboard/DashboardController.php
<?php
/**
*
*
* @author Komma <info@komma.pro>
* @copyright (c) 2012-2016, Komma Mediadesign
*/
namespace KommaApp\Kms\Dashboard;
use Illuminate\Foundation\Application;
use KommaApp\Kms\Core\Kms;
use KommaApp\Kms\Core\KmsController;
use KommaApp\Stats\StatsService;
class DashboardController extends KmsController {
protected $app;
protected $dashboardService;
protected $statsService;
function __construct(Application $app, Kms $kms, SiteDashboardService $dashboardService, StatsService $statsService)
{
parent::__construct($kms);
$this->dashboardService = $dashboardService;
$this->statsService = $statsService;
}
public function index()
{
$searchTermStats = $this->statsService->getSearchTermsStats();
$noResultStats = $this->statsService->getSearchTermsStats(true);
$detailPageStats = $this->statsService->getDetailPageStats();
return \View::make('kms/dashboard.index')
->with([
'searchTermStats' => $searchTermStats,
'noResults' => $noResultStats,
'detailPageStats' => $detailPageStats,
]);
}
}