src/Enum/PaymentStatus.php line 5

Open in your IDE?
  1. <?php
  2. namespace App\Enum;
  3. enum PaymentStatusstring
  4. {
  5.     case PAID 'paid';
  6.     case NOT_PAID 'not_paid';
  7.     case TERM_SALE 'term_sale';
  8.     public function getLabel(): string
  9.     {
  10.         return match ($this) {
  11.             self::PAID => 'Ödendi',
  12.             self::NOT_PAID => 'Ödenmedi',
  13.             self::TERM_SALE => 'Vadeli Satış',
  14.         };
  15.     }
  16.     public function getTranslationKey():string
  17.     {
  18.         return 'payment_status.'.$this->value;
  19.     }
  20. }