Last active
September 6, 2018 14:46
-
-
Save tatma/135b5a3b7cf3553e4777b70b5c2a6191 to your computer and use it in GitHub Desktop.
List articles
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
* Contenuto precedente | |
*/ | |
/** | |
* @Route("/list", name="list_articles") | |
*/ | |
public function listArticles() | |
{ | |
$em = $this->getDoctrine(); | |
$articles = $em->getRepository('App:Article')->findAll(); | |
return $this->render('list.html.twig', [ | |
'articles' => $articles, | |
]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment