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