Example of Enum in firefly-iii/firefly-iii

File app/Enums/ClauseType.php (link to Github)
class ClauseType
{
    public const TRANSACTION = 'transaction';
    public const WHERE       = 'where';
    public const UPDATE      = 'update';
}
File app/Api/V1/Requests/Data/Bulk/TransactionRequest.php (link to Github)
use FireflyIII\Enums\ClauseType;
use FireflyIII\Rules\IsValidBulkClause;
use Illuminate\Foundation\Http\FormRequest;

class TransactionRequest extends FormRequest
{
    //
    public function rules(): array
    {
        return [
            'query' => ['required', 'min:1', 'max:255', 'json', new IsValidBulkClause(ClauseType::TRANSACTION)],
        ];
    }
    //
}

Additional resources on enum: