'integer', 'date' => 'date:Y-m-d', 'due_date' => 'date:Y-m-d', 'status' => InvoiceStatus::class, ]; } public function getActivitylogOptions(): LogOptions { return LogOptions::defaults() ->logAll() ->logOnlyDirty() ->dontLogEmptyChanges(); } protected function formattedAmount(): Attribute { return Attribute::make( get: fn () => 'Rp '.number_format($this->amount, 0, ',', '.'), ); } protected function formattedDate(): Attribute { return Attribute::make( get: fn () => $this->date?->translatedFormat('l, d F Y'), ); } protected function formattedDueDate(): Attribute { return Attribute::make( get: fn () => $this->due_date?->translatedFormat('l, d F Y'), ); } protected function statusLabel(): Attribute { return Attribute::make( get: fn () => $this->status->label(), ); } public function items(): HasMany { return $this->hasMany(InvoiceItem::class); } }