Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v3.2.0 doc update #45

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/basic-usage/basic-usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ Settings::isFalse('app.debug'); // true
Using `all`, you can retrieve all the stored settings, which will be returned as a collection. You may also retrieve a subset of settings
by passing in an array of keys to retrieve.

> {note} Either the `ReadableKeyGenerator` or a custom key generator must be configured to be used before this method can be used.
> See [KeyGenerator docs](/docs/laravel-settings/{version}/advanced-usage/custom-generators#user-content-keygenerator) for more information.
>
> In a future major release, the `ReadableKeyGenerator` may be set to be the default key generator.

```php
Settings::all();

Expand Down
11 changes: 11 additions & 0 deletions docs/basic-usage/teams.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,17 @@ Settings::setTeamId($currentTeamId);

> {tip} You can pass in an eloquent model to `setTeamId` instead of an id if you prefer.

#### Temporary Team Switching

As of `v3.2.0`, to make administering team settings easier, we've added the following convenience methods to `Settings`:

- `usingTeam($teamId)`: Use this method to scope settings to a specific team on a single call.
- `withoutTeams()`: Use this method to remove team scoping for a single call.

```php
settings()->usingTeam('my-team-id')->set('foo', 'bar');
```

## Contextual Settings

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
Expand Down
Loading