amount / 100; } /** * Set amount from currency units (stores as minor units/cents). */ public function setAmountCurrencyAttribute($value): void { $this->attributes['amount'] = round($value * 100); } /** * Format amount for display with proper currency formatting. * This can be extended later to support different currencies. */ public function getFormattedAmountAttribute(): string { return number_format($this->amount / 100, 2); } }