44 lines
978 B
PHP
44 lines
978 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Http\Controllers\Backend;
|
||
|
|
|
||
|
|
use App\Http\Controllers\BaseController;
|
||
|
|
use App\Repositories\Backend\Dashboard\DashboardService;
|
||
|
|
|
||
|
|
class DashboardController extends BaseController
|
||
|
|
{
|
||
|
|
/**
|
||
|
|
* @var dashboardService
|
||
|
|
*/
|
||
|
|
protected $dashboardService;
|
||
|
|
|
||
|
|
/**
|
||
|
|
* DashboardController constructor.
|
||
|
|
* @param SantService $dashboardService
|
||
|
|
*/
|
||
|
|
public function __construct(DashboardService $dashboardService)
|
||
|
|
{
|
||
|
|
$this->dashboardService = $dashboardService;
|
||
|
|
}
|
||
|
|
|
||
|
|
/**
|
||
|
|
* Display a listing of the resource.
|
||
|
|
*
|
||
|
|
* @return \Illuminate\Http\Response
|
||
|
|
*/
|
||
|
|
public function dashboard()
|
||
|
|
{
|
||
|
|
try {
|
||
|
|
$data = [
|
||
|
|
'statistics' => $this->dashboardService->getDashboardStatistics()
|
||
|
|
];
|
||
|
|
|
||
|
|
return view('backend.dashboard', compact(
|
||
|
|
'data'
|
||
|
|
));
|
||
|
|
} catch (\Exception $ex) {
|
||
|
|
Log::error($ex->getMessage());
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|