laravel / pennant

A simple, lightweight library for managing feature flags.
https://laravel.com/docs/pennant
MIT License
474 stars 48 forks source link

Add `loadAll` method #113

Closed timacdonald closed 1 month ago

timacdonald commented 1 month ago

Introduces a loadAll method to make loading all defined features easier.

- Feature::for($user)->load(['feature-1', 'feature-2']);
+ Feature::for($user)->loadAll();

// or

- Feature::for($user)->load(Feature::defined());
+ Feature::for($user)->loadAll();

I don't feel this needs a loadAllMissing variant as this would likely be the first thing you do in your stack.