I have a question .. I implemented Doctrine with Silex, I created the entity, the repository and the service, but at the time I do a search with findByEmail () for example, to display the result I have to use $ result [0] -> getNome () . Would there be any way to remove this [0] from find? my method You are like this:
public function fetchByEmail($email)
{
$usuario = $this->em->getRepository($this->entity);
return $usuario->findByEmail($email);
}
If you need more information just ask me .. Thankful