icon(Heroicon::OutlinedArrowLongRight); } public function getSchema(Schema $schema): Schema { $defaultPath = $this->defaultPath(); $fs = Storage::disk($this->disk()); return $schema ->components([ TextInput::make('path') ->label(__('filament.actions.storage.move.fields.path.name')) ->helperText(__('filament.actions.storage.move.fields.path.help')) ->required() ->doesntStartWith('/') ->endsWith($this->allowedFileExtension()) ->rule(new StorageFileDirectoryExistsRule($fs)) ->default($defaultPath), ]); } /** * Get the underlying storage action. * * @param array $data * @return BaseMoveAction */ abstract protected function storageAction(?Model $record, array $data): StorageActionContract; /** * Resolve the default value for the path field. */ abstract protected function defaultPath(): ?string; /** * The file extension that the path must end with. */ abstract protected function allowedFileExtension(): string; }