Skip to content

Instantly share code, notes, and snippets.

@ollo-ride-nico
Created January 30, 2019 11:56
Show Gist options
  • Save ollo-ride-nico/e03bd6fab66dfb3696cea359200df58c to your computer and use it in GitHub Desktop.
Save ollo-ride-nico/e03bd6fab66dfb3696cea359200df58c to your computer and use it in GitHub Desktop.
/**
* @Route("/tasks", name="task_list")
* @return \Symfony\Component\HttpFoundation\Response
*/
public function listTask(Twig_Environment $twig, EntityManager $manager)
{
return new Response($twig->render('task/list.html.twig', ['tasks' => $manager
//->getDoctrine()
->getRepository('AppBundle:Task')
->findAll()]));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment