'json', 'attachments' => 'json', ]; /** * 不参与版本记录的字段 * @var array|string[] */ protected array $dontVersionable = ['updated_at']; /** * Notes : 获取附件的下载地址 * @Date : 2021/4/16 12:01 下午 * @Author : < Jason.C > * @return \Illuminate\Support\Collection */ public function getAttachmentsUrlAttribute(): Collection { return collect($this->attachments)->map(function ($item) { return Storage::url($item); }); } }