AuditionAdminBilling/app/Enums/PaymentStatus.php

31 lines
680 B
PHP

<?php
namespace App\Enums;
enum PaymentStatus: string
{
case PENDING = 'pending';
case COMPLETED = 'completed';
case FAILED = 'failed';
case REFUNDED = 'refunded';
public function label(): string
{
return match ($this) {
self::PENDING => 'Pending',
self::COMPLETED => 'Completed',
self::FAILED => 'Failed',
self::REFUNDED => 'Refunded',
};
}
public function color(): string
{
return match ($this) {
self::PENDING => 'amber',
self::COMPLETED => 'green',
self::FAILED => 'red',
self::REFUNDED => 'zinc',
};
}
}