Skip to content

Commit 2c600a0

Browse files
authored
Update docs (#45)
1 parent 42800bc commit 2c600a0

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

docs/basic-usage/basic-usage.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ Settings::isFalse('app.debug'); // true
5858
Using `all`, you can retrieve all the stored settings, which will be returned as a collection. You may also retrieve a subset of settings
5959
by passing in an array of keys to retrieve.
6060

61+
> {note} Either the `ReadableKeyGenerator` or a custom key generator must be configured to be used before this method can be used.
62+
> See [KeyGenerator docs](/docs/laravel-settings/{version}/advanced-usage/custom-generators#user-content-keygenerator) for more information.
63+
>
64+
> In a future major release, the `ReadableKeyGenerator` may be set to be the default key generator.
65+
6166
```php
6267
Settings::all();
6368

docs/basic-usage/teams.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,17 @@ Settings::setTeamId($currentTeamId);
102102

103103
> {tip} You can pass in an eloquent model to `setTeamId` instead of an id if you prefer.
104104
105+
#### Temporary Team Switching
106+
107+
As of `v3.2.0`, to make administering team settings easier, we've added the following convenience methods to `Settings`:
108+
109+
- `usingTeam($teamId)`: Use this method to scope settings to a specific team on a single call.
110+
- `withoutTeams()`: Use this method to remove team scoping for a single call.
111+
112+
```php
113+
settings()->usingTeam('my-team-id')->set('foo', 'bar');
114+
```
115+
105116
## Contextual Settings
106117

107118
The `Context` object can be used in conjunction with teams for further scoping of settings. The most common scenario for this would be if you have a

0 commit comments

Comments
 (0)