Skip to content

Commit

Permalink
BlogFacade refactored
Browse files Browse the repository at this point in the history
  • Loading branch information
Dreiser committed Mar 6, 2016
1 parent a2b03f2 commit 06030f3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/model/Facade/BlogFacade.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ public function getArticleComments(Article $article)
*/
public function findNewArticles()
{
$today = new DateTime();
$query = (new ArticleQuery())
->publishedFrom($today->sub(new \DateInterval('P1M'))) // Find published max 1 month ago
->publishedFrom((new DateTime())->sub(new \DateInterval('P1M'))) // Find published max 1 month ago
->orderByPublished('DESC') // Ordered by published DESC
->withVisibleComments();

return $this->articleRepository->fetch($query);
}
}

0 comments on commit 06030f3

Please sign in to comment.