<?php
 namespace App\Services\Content; class PostUploadPath { public static function folder(string $type): string { return match ($type) { 'announcement' => 'announcements', 'kb_article' => 'kb', 'blog_post' => 'blog', default => throw new \InvalidArgumentException("Unknown post type: {$type}"), }; } public static function buildDatedPath(string $type, string $subFolder = ''): string { $base = self::folder($type); $date = now()->format('Y/m/d'); return $subFolder !== '' ? "{$base}/{$subFolder}/{$date}" : "{$base}/{$date}"; } } 