has-parameters icon indicating copy to clipboard operation
has-parameters copied to clipboard

feat: add enum support

Open bpotmalnik opened this issue 11 months ago • 2 comments

In this PR, I've updated trait to support BackedEnums.

Example: I have enum with available features in the system, and middleware that is checking if given feature is enabled with some sets of rules. Different endpoint allow different features, and instead of string, I wanted to use our already existing enum.

FeatureEnabled::with([
   'feature' => Feature::Catalogue,
])

Thanks for great package!

bpotmalnik avatar Jul 17 '23 13:07 bpotmalnik