diff --git a/src/AppBundle/Repository/PostRepository.php b/src/AppBundle/Repository/PostRepository.php index 34a77a881..26cdf8242 100644 --- a/src/AppBundle/Repository/PostRepository.php +++ b/src/AppBundle/Repository/PostRepository.php @@ -27,6 +27,14 @@ */ class PostRepository extends EntityRepository { + /** + * @return Post[] + */ + public function findAll() + { + return $this->findBy([], ['publishedAt' => 'DESC']); + } + /** * @return Query */