From 23134764937fea52a4042003ffb1619187c037ee Mon Sep 17 00:00:00 2001 From: panliang <1163816051@qq.com> Date: Sun, 8 Oct 2023 15:02:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20app/Casts/StorageFile.php?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Casts/StorageFile.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Casts/StorageFile.php b/app/Casts/StorageFile.php index 8c75f25..0150df5 100644 --- a/app/Casts/StorageFile.php +++ b/app/Casts/StorageFile.php @@ -32,7 +32,7 @@ class StorageFile implements CastsAttributes */ 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; } /**