Files
daily-meal-api/app/Enums/BillingProductPurpose.php
T
leonm 2ece4b6e3e
CI / 🧪 Tests Laravel (push) Successful in 2m48s
CI / 🐳 Build & Push Image (push) Successful in 3m0s
feat: subscriptions
2026-08-07 11:53:46 +02:00

29 lines
709 B
PHP

<?php
namespace App\Enums;
use Filament\Support\Contracts\HasColor;
use Filament\Support\Contracts\HasLabel;
enum BillingProductPurpose: string implements HasColor, HasLabel
{
case SUBSCRIPTION = 'subscription';
case CERTIFICATION = 'certification';
public function getLabel(): string
{
return match ($this) {
self::SUBSCRIPTION => __('enums.billing_product_purpose.subscription'),
self::CERTIFICATION => __('enums.billing_product_purpose.certification'),
};
}
public function getColor(): string
{
return match ($this) {
self::SUBSCRIPTION => 'info',
self::CERTIFICATION => 'success',
};
}
}