You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AccountType.php 492B

1234567891011121314151617181920212223
  1. <?php
  2. namespace App\Enums;
  3. use Filament\Support\Contracts\HasLabel;
  4. enum AccountType: string implements HasLabel
  5. {
  6. case Checking = 'checking';
  7. case Savings = 'savings';
  8. case MoneyMarket = 'money_market';
  9. case CreditCard = 'credit_card';
  10. case Merchant = 'merchant';
  11. public const DEFAULT = self::Checking->value;
  12. public function getLabel(): ?string
  13. {
  14. $label = ucwords(str_replace('_', ' ', $this->value));
  15. return translate($label);
  16. }
  17. }