usingSearchString(request('search')); if (!empty($this->ids)) { $model->whereIn('id', (array) $this->ids); } return $model->get(); } public function map($model): array { $model->category_name = $model->category->name; return parent::map($model); } public function fields(): array { return [ 'bill_number', 'order_number', 'status', 'billed_at', 'due_at', 'amount', 'currency_code', 'currency_rate', 'category_name', 'contact_name', 'contact_email', 'contact_tax_number', 'contact_phone', 'contact_address', 'notes', 'footer', ]; } }