/** * Index action */ public function indexAction() { try { $this->view->groups = Groups::find(); if ($this->request->isPost()) { $this->view->groups = Groups::find("UPPER(name) LIKE UPPER('%" . $this->request->getPost('groups', 'string') . "%')"); $this->view->pesquisa = $this->request->getPost('groups'); } } catch (Exception $exc) { $this->flash->error($e->getMessage()); } }