whisper-money/app/Enums/BudgetPeriodType.php

20 lines
365 B
PHP

<?php
namespace App\Enums;
enum BudgetPeriodType: string
{
case Monthly = 'monthly';
case Weekly = 'weekly';
case Biweekly = 'biweekly';
public function label(): string
{
return match ($this) {
self::Monthly => 'Monthly',
self::Weekly => 'Weekly',
self::Biweekly => 'Bi-weekly',
};
}
}