Closed timacdonald closed 2 months ago
This feels like a better and more laravely solution than #110. I love it.
Just a quick hint: The link of this repository does not point to the current docs (it's linking to 10.x).
Updated that. Thanks for the heads up.
replaces https://github.com/laravel/pennant/pull/110
This PR introduces a "before" hook to class based features that allows you to intercept feature resolution before hitting the storage driver.
When a non-null value is returned from the before hook, it is used in place of retrieving the value from storage. Values returned from the before hook are never persisted to storage and are only ever used in-memory.
This allows you to:
Example: Schedule the initial feature rollout after a given date
Example: Roll the feature out to everyone after a given date.
Example: provide a non-destructive killswitch
Example: composing different usecases