public function all($entity) { parent::all($entity); $this->filter = \DataFilter::source(new \App\Comments()); $this->filter->add('active', 'Active', 'select')->options(\App\Comments::lists("Active", "active")->all()); $this->filter->add('name', 'Name', 'text'); $this->filter->add('created_at', 'Created Date', 'datetime')->format('Y-m-d H:i:s', 'uk'); $this->filter->submit('search'); $this->filter->reset('reset'); $this->filter->build(); $this->grid = \DataGrid::source($this->filter); $this->grid->add('active', 'Active', 'active'); $this->grid->add('name', 'Name'); $this->grid->add('comment', 'Comment'); $this->grid->add('created_at', 'Created Date', 'created_at'); $this->addStylesToGrid(); return $this->returnView(); }