Filament\Pages\Actions\Action::make($name) ->label(__('Attachments')) ->icon('heroicon-o-paper-clip') ->iconButton() ->modalWidth('xl') ->modalButton(__('Save')) ->slideOver() ->record($this->record) ->model($record::class) ->mountUsing(function (ComponentContainer $form, $record) { $form->fill($record->toArray()); }) ->action(function (array $arguments, ComponentContainer $form): void { $model = $this->record::class; $record = $this->record; $form->model($record)->saveRelationships(); }) ->form([ SpatieMediaLibraryFileUpload::make('attachments') ->disk('documents') ->multiple() ->responsiveImages() ->columnSpanFull(), ]);