Skip to content

Commit af89264

Browse files
committed
feature instances
1 parent 8bc2cdb commit af89264

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

pennant.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,14 @@ class NewApi
143143
}
144144
```
145145

146+
If you would like to manually resolve an instance of a class based feature, you may invoke the `instance` method on the `Feature` facade:
147+
148+
```php
149+
use Illuminate\Support\Facades\Feature;
150+
151+
$instance = Feature::instance(NewApi::class);
152+
```
153+
146154
> [!NOTE]
147155
> Feature classes are resolved via the [container](/docs/{{version}}/container), so you may inject dependencies into the feature class's constructor when needed.
148156

0 commit comments

Comments
 (0)