resolvePath($category, $path); $url = $this->diskSupportsDirectUrl() ? Storage::disk($this->disk)->url($fullPath) : null; $filtered = HookManager::applyFilters('core.storage.filter_url', $url, array_merge( $this->urlHookContext(), [ 'disk' => $this->disk, 'category' => $category, 'path' => $path, 'full_path' => $fullPath, ] )); return (is_string($filtered) && trim($filtered) !== '') ? $filtered : null; } /** * 현재 디스크가 직접 URL 생성을 지원하는지 판정합니다. * * public 디스크는 항상 지원, 그 외 디스크는 `filesystems.disks.{disk}.url` 이 * 비어 있지 않은 문자열로 설정된 경우에만 지원합니다 (AWS_URL 미설정/빈값 방어). * * @return bool 직접 URL 지원 여부 */ private function diskSupportsDirectUrl(): bool { if ($this->disk === 'public') { return true; } $base = config("filesystems.disks.{$this->disk}.url"); return is_string($base) && trim($base) !== ''; } /** * `core.storage.filter_url` 훅 컨텍스트의 드라이버별 식별 정보를 반환합니다. * * @return array{scope: string, identifier: ?string} scope(core|module|plugin) + 확장 식별자(코어는 null) */ abstract protected function urlHookContext(): array; }