/**
* @Route("/query/user.json", name="user_select")
*/
public function userSelectAction(Request $request)
{
$em = $this->getDoctrine()->getManager();
$result = $em->createQuery('
SELECT u.id, u.username as text
FROM AppBundle:User u
WHERE lower(u.username) LIKE :username
ORDER BY u.username
')
->setParameter('username', '%' . $query . '%')
->setMaxResults(10)
->getArrayResult();
return new JsonResponse($result);
}
hello,
i'm using SF3 and tried to install this bundle. I'm supposed to get an input form with a "search" input text like https://github.com/tetranz/select2entity-bundle/blob/master/Resources/doc/img/multi.png but I've got this :
Here is my form :
My Appkernel contains :
My template:
My controller :
Any idea ? Thanks