Skip to content

Commit dbd5e84

Browse files
docs: document helper method
1 parent 3699836 commit dbd5e84

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/pages/state-sharing.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,13 @@ class UserResource extends StatefulJsonResource
4444
}
4545
```
4646

47-
## ActiveState Facade
48-
You may also set the shared state explicitly through the `ActiveState` facade instead:
47+
## Facade & Helper
48+
You may also set the shared state explicitly through the `ActiveState` facade or the `activeResourceState` helper function instead:
4949

5050
```php
5151
use Farbcode\StatefulResources\Facades\ActiveState;
5252

53-
ActiveState::setShared('minimal');
53+
ActiveState::set('minimal');
54+
// or
55+
activeResourceState()->set('minimal');
5456
```

0 commit comments

Comments
 (0)