0
我使用这个代码让所有用户在数据库排除某些领域中的findAll Symfony2的
$users= $this->getDoctrine()
->getRepository('AppBundle:Users')
->findAll();
return $this->render('livre/users.html.twig',array(
'users' => $users,
));
但我想只得到某些领域sush为name
,email
和隐藏像password
.. 谢谢领域。
你有没有考虑过在视图中不提供密码? – jcroll
对不起,我不明白 – user3057822