PHP Enum Class in Laravel: Extra Custom Methods

PHP Enum Class in Laravel: Extra Custom Methods

Laravel Daily

1 год назад

4,996 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Ben Leah
Ben Leah - 28.07.2023 19:07

When you have many enums it's inevitable that there will be useful utility methods applicable to all ... for DRY enums how best to share these methods in the absence of being able to extend from a parent enum?

Ответить
Artem
Artem - 10.07.2023 16:40

Hey Povilas! Could you answer my question under 8 lesson of Splade tutorial on premium Laravel Daily course? Even if you don't get my question tell me what part of my question should i make clear

Ответить
Anton Cherednichenko
Anton Cherednichenko - 10.07.2023 12:54

I'm starting to see the advantage... So basically if public constants are being transformed later in the code, it's indeed easier to create an enum class with its methods.
Good to know!

Ответить