usingSearchString(request('search')); if (!empty($this->ids)) { $model->whereIn('item_id', (array) $this->ids); } return $model->cursor(); } public function map($model): array { $item = $model->item; if (empty($item)) { return []; } $model->item_name = $model->item->name; $model->tax_rate = $model->tax->rate; return parent::map($model); } public function fields(): array { return [ 'item_name', 'tax_rate', ]; } }