1234
5678
9101112
13141516
1718
namespace App\Controller;
#[Route('/dashboard', name: 'app_dash')]
class DashboardController extends AbstractController
{
public function index(
MetricsService $metrics,
EntityManagerInterface $em
): Response {
return $this->render('dashboard/index.twig', [
'revenue' => $metrics->getMonthlyRevenue(),
'users' => $metrics->getActiveUsers(),
'growth' => $metrics->getGrowthRate(),
'projects' => $em->getRepository(Project::class)->findActive(),
]);
}
}