Created
March 14, 2021 07:13
-
-
Save andreybolonin/648634ae2d64073c1a8602c171ccc7f7 to your computer and use it in GitHub Desktop.
ContactController.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$query = $this->getDoctrine() | |
->getRepository(Contact::class) | |
->createQueryBuilder('c'); | |
$contacts = $paginator->paginate( | |
$query, /* query NOT result */ | |
$request->query->getInt('page', 1)/*page number*/ , | |
$request->getSession()->get('items', $request->query->get('items', 100)) | |
); | |
return $this->render('contact/index.html.twig', [ | |
'contacts' => $contacts, | |
]); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment