I returned 10 users in a view via this fucnion..
public function getUsers()
{
$u = $this->get('u')->getUsersBy();
return $this->render('@Templates/admin/users.html.twig',
array('u' => $u)
);
}
but I need to separate it and to return ALL users via second function, but can't figure this part out.
Your question is not very clear, but typically when you want to return all data from your db, you're doing something like :
$users = $this->getDoctrine()->getRepository('YOUR/USER/ENTITY')->findAll();
return $users;