提交 e3b36b5a 编写于 作者: T teebbstudios

render() and fix index()

上级 903f9158
......@@ -17,7 +17,7 @@ class PostController extends AbstractController
public function index(PostRepository $postRepository): Response
{
return $this->render('post/index.html.twig', [
'posts' => $postRepository->findAll(),
'posts' => $postRepository->findBy(['status' => 'published'], ['id' => 'DESC']),
]);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册