Esempio n. 1
0
 /**
  * obtém os registros para exibir no grid
  */
 public function index()
 {
     $this->preparar_filtros();
     if ($this->filtros->tem_filtro) {
         $where = " grupo     LIKE '%{$this->filtros->filtro_grupo}%' ";
     } else {
         $where = WHERE_TODOS_REGISTROS;
     }
     $rs = Grupo::whereRaw($where)->orderBy($this->filtros->order, $this->filtros->posicao)->paginate($this->total_registros);
     return view('grupos.grupos_grid')->with('rs', $rs)->with('filtros', $this->filtros);
 }