28 lines
807 B
PHP
28 lines
807 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Admin;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Services\System\DashboardService;
|
|
use Inertia\Inertia;
|
|
use Inertia\Response;
|
|
|
|
class DashboardController extends Controller
|
|
{
|
|
public function __construct(
|
|
private readonly DashboardService $dashboardService,
|
|
) {}
|
|
|
|
public function index(): Response
|
|
{
|
|
return Inertia::render('admin/Dashboard', [
|
|
'attendance' => $this->dashboardService->getAttendance(),
|
|
'cashOverview' => $this->dashboardService->getCashOverview(),
|
|
'revenueSummary' => $this->dashboardService->getRevenueSummary(),
|
|
'expenseSummary' => $this->dashboardService->getExpenseSummary(),
|
|
|
|
'orderStats' => $this->dashboardService->getOrderStats(),
|
|
]);
|
|
}
|
|
}
|