We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5643ca commit 87584a6Copy full SHA for 87584a6
src/AppBundle/Controller/Admin/BlogController.php
@@ -54,7 +54,7 @@ class BlogController extends Controller
54
public function indexAction()
55
{
56
$entityManager = $this->getDoctrine()->getManager();
57
- $posts = $entityManager->getRepository(Post::class)->findAll();
+ $posts = $entityManager->getRepository(Post::class)->findBy([], ['publishedAt' => 'DESC']);
58
59
return $this->render('admin/blog/index.html.twig', ['posts' => $posts]);
60
}
0 commit comments