Controller/DefaultController.php
public function clientes(Request $request)
    {
        $envelope  = new Envelope();
        $documento = $request->get('q');
        $clientes  = $this
            ->getDoctrine()
            ->getManager()
            ->getRepository(Cliente::class)
            ->findByDocumento("{$documento}%");
        
        $envelope->setData($clientes);

        return $this->json($envelope);
    }
public function clientes(Request $request)
    {
        $envelope  = new Envelope();
        $documento = $request->get('q');
        $clientes  = $this
            ->getDoctrine()
            ->getManager()
            ->getRepository(Cliente::class)
            ->findByDocumento("{$documento}%");
        
        $envelope->setData($clientes);

        return $this->json($envelope);
    }
public function clientes ( Request $ request ) { $ envelope = new Envelope ( ) ; $ documento = $ request -> get ( 'q' ) ; $ clientes = $ this -> getDoctrine ( ) -> getManager ( ) -> getRepository ( Cliente :: class ) -> findByDocumento ( "{$documento}%" ) ; $ envelope -> setData ( $ clientes ) ; return $ this -> json ( $ envelope ) ; }
Busca os clientes a partir do documento.

@param Request $request
@return Response

@Route("/clientes", name="novosga_triage_clientes", methods={"GET"})
Busca os clientes a partir do documento .