i have problem with JsonResponse. Here is my code:
$repo = $this->getDoctrine()->getRepository($repoName);
$users = $repo->findAll();
return new JsonResponse($users);
So when I use var_dump($users) I have arrays with all data, but JsonResponse return me empty arrays.
Does anyone know what could have become ?
new JsonResponse(array('name' => $name));.