HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
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,
            ]);
    }

}