Skip to content

Commit

Permalink
Ensure default Post sort order shows newer Posts first
Browse files Browse the repository at this point in the history
  • Loading branch information
simensen committed Sep 29, 2016
1 parent a5643ca commit 6ede65b
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/AppBundle/Repository/PostRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,14 @@
*/
class PostRepository extends EntityRepository
{
/**
* @return Post[]
*/
public function findAll()
{
return $this->findBy([], ['publishedAt' => 'DESC']);
}

/**
* @return Query
*/
Expand Down

0 comments on commit 6ede65b

Please sign in to comment.