whisper-money/app/Enums/BudgetPeriodType.php

22 lines
431 B
PHP

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