getCustomProperty('module', 'media'); $type = $media->getCustomProperty('type'); $date = $media->created_at?->format('Y-m-d') ?? now()->format('Y-m-d'); $id = $media->model_id; if ($type) { return "{$module}/{$type}/{$date}/{$id}/"; } return "{$module}/{$date}/{$id}/"; } public function getPathForConversions(Media $media): string { return $this->getPath($media).'conversions/'; } public function getPathForResponsiveImages(Media $media): string { return $this->getPath($media).'responsive-images/'; } }