26 lines
682 B
PHP
26 lines
682 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Services\DashboardService;
|
|
use Illuminate\View\View;
|
|
|
|
class DashboardController extends Controller
|
|
{
|
|
public function __construct(
|
|
private readonly DashboardService $dashboardService
|
|
) {}
|
|
|
|
public function index(): View
|
|
{
|
|
return view('dashboard', [
|
|
'stats' => $this->dashboardService->getStats(),
|
|
'todayActivities' => $this->dashboardService->getTodayActivities(),
|
|
'latestInvoices' => $this->dashboardService->getLatestInvoices(),
|
|
'socialStats' => $this->dashboardService->getSocialStats(),
|
|
]);
|
|
}
|
|
}
|