public function all($entity) { parent::all($entity); $this->filter = \DataFilter::source(Role::with('permissions')); $this->filter->add('id', 'ID', 'text'); $this->filter->add('name', 'Name', 'text'); $this->filter->submit('search'); $this->filter->reset('reset'); $this->filter->build(); $this->grid = \DataGrid::source($this->filter); $this->grid->add('id', 'ID', true)->style("width:100px"); $this->grid->add('name', 'Name')->style('width:100px'); $this->grid->add('label', 'Description'); $this->grid->add('{{ implode(", ", $permissions->lists("name")->all()) }}', 'name'); $this->addStylesToGrid(); return $this->returnView(); }