Closed flexchar closed 5 months ago
Hi @flexchar. In this case, it's best that you send in a PR so we can look at the code involved. Thanks
I understand. Time is precious. What are your thoughts before code is written? @driesvints
I don't maintain the codebase of Pennant directly. It's best that you just send in a PR with your idea. If it doesn't work out you can always adopt the code directly or fork the package.
@flexchar, you should be able to use Feature::defined()
to retrieve all defined features for a the driver.
Thank you Tim! It actually was it. I put a todo to make a PR for laravel docs to mention it. :)
PS. Thank you for this great package!
Hey! We currently can retrieve all flags for a scope (user) using
Feature::all()
or$user->features()->all
. How about retrieving a list of flags that can be used without their status/value?I am writing an action for Laravel Nova so that staff could toggle the flags, or provide a rich value, if applicable. Of course I can take the keys from the previous method since they all will be same for all the application but perhaps we could introduce a method to retrieve all registered features.
What do you think?
I am open to contributing as well.