vendredi 22 juillet 2016

How to add a "search bar " bundle or funtion in a Symfony 2 app

I wanna add a search bar composant to filter my results of searching. Actually I have just a function which gives me all the data from DB.

public function indexAction() {
    $em = $this->getDoctrine()->getManager();

    $entities = $em->getRepository('MaisonMaisonBundle:Maison')->findAll();

    return array(
        'entities' => $entities,
    );
}

I want to just add an SQL request which gives me a filtered result, even a search bar bundle.

Aucun commentaire:

Enregistrer un commentaire