This commit is contained in:
2021-10-22 13:22:25 +08:00
parent 4e6110cdc0
commit 173a03b83d

View File

@@ -7,6 +7,7 @@ use Illuminate\Support\Facades\Storage;
class ArticlePicture extends Model class ArticlePicture extends Model
{ {
use BelongsToCategory; use BelongsToCategory;
public function setPicturesAttribute($pictures) public function setPicturesAttribute($pictures)
@@ -27,7 +28,11 @@ class ArticlePicture extends Model
if (empty($cover)) { if (empty($cover)) {
return ''; return '';
} else { } else {
return Storage::disk('public')->url($cover[0]); foreach ($cover as $item) {
return Storage::disk('public')->url($item);
}
} }
} }
} }