fillAttributeWithAttachment($request, $requestAttribute, $model, $attribute); } /** * Get the full path that the field is stored at on disk. * * @return string|null */ public function getStoragePath() { return null; } /** * Make the field filter. * * @param \Laravel\Nova\Http\Requests\NovaRequest $request * @return \Laravel\Nova\Fields\Filters\Filter */ protected function makeFilter(NovaRequest $request) { return new TextFilter($this); } /** * Prepare the field for JSON serialization. * * @return array */ public function serializeForFilter() { return transform($this->jsonSerialize(), function ($field) { return Arr::only($field, [ 'uniqueKey', 'name', 'attribute', ]); }); } /** * Prepare the element for JSON serialization. * * @return array */ public function jsonSerialize(): array { return array_merge(parent::jsonSerialize(), [ 'shouldShow' => $this->shouldBeExpanded(), 'withFiles' => $this->withFiles, ]); } }