has-parameters
has-parameters copied to clipboard
feat: add enum support
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!