1
0
Fork 0

更新 app/Casts/StorageFile.php

panliang 2023-10-08 15:02:29 +08:00
parent 3b39557c1a
commit 2313476493
1 changed files with 1 additions and 1 deletions

View File

@ -32,7 +32,7 @@ class StorageFile implements CastsAttributes
*/ */
public function get($model, $key, $value, $attributes) public function get($model, $key, $value, $attributes)
{ {
return $value ? (Str::startsWith($value, ['http://', 'https://']) ? $value : Storage::disk($this->disk)->url($value)) : ''; return $value ? (Str::startsWith($value, ['http://', 'https://']) ? $value : Storage::disk($this->disk)->url($value)) : null;
} }
/** /**