/** * Método para buscar */ public function buscar($field = 'sucursal', $value = 'none', $order = 'order.id.asc', $page = 1) { $page = Filter::get($page, 'page') > 0 ? Filter::get($page, 'page') : 1; $field = Input::hasPost('field') ? Input::post('field') : $field; $value = Input::hasPost('field') ? Input::post('value') : $value; $value = strtoupper($value); $marca = new Marca(); $marcas = $marca->getAjaxMarcas($field, $value, $order, $page); if (empty($marcas->items)) { DwMessage::info('No se han encontrado registros'); } $this->marcas = $marcas; $this->order = $order; $this->field = $field; $this->value = $value; $this->page_title = 'Búsqueda de marcas del sistema'; }