feat: complete comment history
This commit is contained in:
@@ -8,3 +8,21 @@ if (!function_exists('getUserFullName')) {
|
||||
return $user->first_name . ' ' . $user->last_name;
|
||||
}
|
||||
}
|
||||
|
||||
if (!function_exists('getFileUrl')) {
|
||||
|
||||
function getFileUrl(?int $fileId): ?string
|
||||
{
|
||||
if (!$fileId){
|
||||
return null;
|
||||
}
|
||||
|
||||
$file = \App\Models\File::find($fileId);
|
||||
|
||||
if (!$file) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return asset('storage/' . $file->path);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user