feat: add storage_url helper function and update image URL retrieval to use public disk

This commit is contained in:
2025-11-30 08:20:51 -05:00
parent 5f7f2098ec
commit d4c90da807
6 changed files with 47 additions and 6 deletions

View File

@@ -0,0 +1,24 @@
<?php
namespace App\Helpers;
use Illuminate\Support\Facades\Storage;
class StorageHelper
{
/**
* Get the URL for a file stored on the public disk
*
* @param string|null $path
* @return string|null
*/
public static function url(?string $path): ?string
{
if (!$path) {
return null;
}
return Storage::disk('public')->url($path);
}
}