Style pagination with Bootstrap

This commit is contained in:
2024-06-08 15:50:45 +02:00
parent 9aa8416442
commit 4a699fd0b8
5 changed files with 42 additions and 27 deletions

View File

@@ -17,6 +17,11 @@ class PostRepository extends ServiceEntityRepository
parent::__construct($registry, Post::class);
}
/**
* @param int $page
* @param int $limit
* @return Paginator<Post>
*/
public function findPaginatedPosts(int $page, int $limit): Paginator
{
$query = $this->createQueryBuilder('p')
@@ -25,6 +30,7 @@ class PostRepository extends ServiceEntityRepository
return new Paginator($query, fetchJoinCollection: false);
}
// /**
// * @return Post[] Returns an array of Post objects
// */