diff --git a/src/AppBundle/Controller/Admin/BlogController.php b/src/AppBundle/Controller/Admin/BlogController.php index ed12b5b20..898b07378 100644 --- a/src/AppBundle/Controller/Admin/BlogController.php +++ b/src/AppBundle/Controller/Admin/BlogController.php @@ -54,7 +54,7 @@ class BlogController extends Controller public function indexAction() { $entityManager = $this->getDoctrine()->getManager(); - $posts = $entityManager->getRepository(Post::class)->findAll(); + $posts = $entityManager->getRepository(Post::class)->findBy([], ['publishedAt' => 'DESC']); return $this->render('admin/blog/index.html.twig', ['posts' => $posts]); }