AuditionAdminBilling/app/Enums/InvoiceStatus.php

32 lines
628 B
PHP

<?php
namespace App\Enums;
enum InvoiceStatus: string
{
case DRAFT = 'draft';
case POSTED = 'posted';
case VOID = 'void';
case PAID = 'paid';
public function label(): string
{
return match ($this) {
self::DRAFT => 'Draft',
self::POSTED => 'Posted',
self::VOID => 'Voided',
self::PAID => 'Paid',
};
}
public function color(): string
{
return match ($this) {
self::DRAFT => 'gray',
self::POSTED => 'green',
self::VOID => 'zinc',
self::PAID => 'blue',
};
}
}