performance on dashboard, larger map

This commit is contained in:
Tykayn 2025-06-04 01:03:07 +02:00 committed by tykayn
parent deeaf2b71e
commit 9a097d2375
4 changed files with 57 additions and 39 deletions

View file

@ -172,13 +172,16 @@ class PublicController extends AbstractController
// get stats
$stats = $this->entityManager->getRepository(Stats::class)->findAll();
$places = $this->entityManager->getRepository(Place::class)->findBy([], ['zip_code' => 'ASC', 'name' => 'ASC']);
// Compter le nombre total de lieux
$placesCount = $this->entityManager->getRepository(Place::class)->count([]);
return $this->render('public/dashboard.html.twig', [
'controller_name' => 'PublicController',
'mapbox_token' => $_ENV['MAPBOX_TOKEN'],
'maptiler_token' => $_ENV['MAPTILER_TOKEN'],
'stats' => $stats,
'places' => $places,
'places_count' => $placesCount,
]);
}