belongsTo(User::class); } // 关联订单 public function order(): BelongsTo { return $this->belongsTo(Order::class); } public function getBeforeAttribute($value): string { return $this->attributes['before'] = formatBytes($value); } public function getAfterAttribute($value): string { return $this->attributes['after'] = formatBytes($value); } }