Skip to content

Commit 2b215aa

Browse files
[10.x] Documents Feature::values() (#8559)
* Documents `Feature::values()` * Update pennant.md --------- Co-authored-by: Taylor Otwell <[email protected]>
1 parent 05eaeaa commit 2b215aa

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pennant.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,17 @@ Pennant's included Blade directive also makes it easy to conditionally render co
523523
@endfeature
524524
```
525525

526+
If you would like to retrieve multiple feature values at once for a single scope, you may use the `values` method:
527+
528+
```php
529+
Feature::values(['new-api', 'purchase-button']);
530+
531+
// [
532+
// 'new-api' => false,
533+
// 'purchase-button' => 'tart-orange',
534+
// ]
535+
```
536+
526537
> **Note** When using rich values, it is important to know that a feature is considered "active" when it has any value other than `false`.
527538
528539
<a name="eager-loading"></a>

0 commit comments

Comments
 (0)