'array', 'processed_at' => 'datetime', ]; public function markProcessed(): void { $this->update(['status' => 'processed', 'processed_at' => now()]); } public function markFailed(string $error): void { $this->update(['status' => 'failed', 'processing_error' => $error]); } public function scopePending($query) { return $query->where('status', 'received'); } }