Answer the question
In order to leave comments, you need to log in
How to paginate data in Symfony?
Good afternoon, I want to make paginated data output on the page. Made a request.
$em = $this->getDoctrine()->getManager();
$data = $em->getRepository(Buildingimage::class)->findAll();
$query = $em->createQuery(
'SELECT
p.id, p.logourl, p.name
FROM
App\Entity\Builders p
'
)->setMaxResults(10)->setFirstResult(0)->getResult();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question