label(__('filament.actions.audio.move.name')); $this->authorize('create', Audio::class); } /** * Get the underlying storage action. * * @param Audio $audio * @param array $fields * @return MoveAudio */ protected function storageAction(BaseModel $audio, array $fields): MoveAudio { /** @var string $path */ $path = Arr::get($fields, 'path'); return new MoveAudio($audio, $path); } /** * The name of the disk. * * @return string */ public function disk(): string { return Config::get(AudioConstants::DEFAULT_DISK_QUALIFIED); } /** * Resolve the default value for the path field. * * @return string|null */ protected function defaultPath(): ?string { $audio = $this->getRecord(); return $audio instanceof Audio ? $audio->path : null; } /** * The file extension that the path must end with. * * @return string */ protected function allowedFileExtension(): string { return '.ogg'; } }