Guest User

Untitled

a guest
Jul 26th, 2017
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. /**
  2. * @Route("/article/{id}", name="article_view")
  3. * @param $id
  4. * @return \Symfony\Component\HttpFoundation\Response
  5. */
  6. public function viewArticle($id)
  7. {
  8. $article = $this->getDoctrine()->getRepository(Article::class)->find($id);
  9. return $this->render("article/article.html.twig",
  10. [
  11. "article" => $article
  12. ]);
  13. }
  14.  
  15. /**
  16. * @Route("/article/allarticles", name="123")
  17. * @return \Symfony\Component\HttpFoundation\Response
  18. */
  19. public function test()
  20. {
  21. return $this->render("article/allarticles.html.twig");
  22. }
Advertisement
Add Comment
Please, Sign In to add comment