Similar to the @canany directive that Laravel provides, this new directive allows you to check the status of multiple features at once with boolean OR behaviour with the @featureany directive.
@featureany(['foo', 'bar'])
foo or bar is active
@else
foo and bar are inactive
@endfeatureany
I went for the featureany since it is more inline with other directives that do a similar thing, but I also had the idea of adding array support to the regular @feature directive.
There's no value comparison support because it didn't make sense since different features will likely have different values.
Similar to the
@canany
directive that Laravel provides, this new directive allows you to check the status of multiple features at once with boolean OR behaviour with the@featureany
directive.I went for the
featureany
since it is more inline with other directives that do a similar thing, but I also had the idea of adding array support to the regular@feature
directive.There's no value comparison support because it didn't make sense since different features will likely have different values.
Open to feedback of course!