'datetime', 'snapshot' => 'array', 'metadata' => 'array', ]; public function user() { return $this->belongsTo(User::class); } public function processor() { return $this->belongsTo(User::class, 'processed_by'); } public function isPending(): Attribute { return Attribute::make( get: fn () => $this->status === self::STATUS_PENDING, ); } public function isApproved(): Attribute { return Attribute::make( get: fn () => $this->status === self::STATUS_APPROVED, ); } public function scopePending($query) { return $query->where('status', self::STATUS_PENDING); } }