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