'decimal:2', 'daily_limit' => 'decimal:2', ]; /** * Get formatted max budget display */ public function getMaxBudgetFormattedAttribute(): string { if ($this->monthly_limit) { return '$' . number_format($this->monthly_limit, 2); } if ($this->daily_limit) { return '$' . number_format($this->daily_limit, 2) . '/day'; } return 'Unlimited'; } /** * Get human-readable duration */ public function getDurationHumanAttribute(): string { if ($this->monthly_limit && $this->daily_limit) { return 'Monthly'; } if ($this->daily_limit && !$this->monthly_limit) { return 'Daily'; } return 'Unlimited'; } public function gatewayUsers() { return $this->hasMany(GatewayUser::class, 'budget_id', 'budget_id'); } }