Skip to content

Instantly share code, notes, and snippets.

@jmolivas
Created September 1, 2014 04:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmolivas/90b406b459b76a5e374e to your computer and use it in GitHub Desktop.
Save jmolivas/90b406b459b76a5e374e to your computer and use it in GitHub Desktop.
ORM won't kill any kittens
public function indexAction(){
$entityManager = $this->getDoctrine()->getManager();
$articles = $entityManager->getRepository('ORMDemoBundle:Article')->findAll();
return $this->render(
'ORMDemoBundle:Article:index.html.twig',
['articles' => $articles]
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment