Guest User

Untitled

a guest
Dec 14th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. namespace App\Controller;
  4.  
  5. use Symfony\Bundle\FrameworkBundle\Controller\Controller;
  6. use Symfony\Component\Security\Core\User\UserInterface;
  7.  
  8. class UserController extends Controller
  9. {
  10. public function indexAction($name)
  11. {
  12. $entityManager = $this->getDoctrine()->getManager();
  13.  
  14. $users = $entityManager->getRepository(UserInterface::class)->findAll();
  15.  
  16. return $this->render('mytemplate.html.twig', [
  17. 'users' => $users
  18. ]);
  19. }
  20. }
Add Comment
Please, Sign In to add comment