Skip to content

Commit 486b8bb

Browse files
committed
wip
1 parent c205dfd commit 486b8bb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

context.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,14 @@ Context::get('breadcrumbs');
293293
// ['first_value']
294294
```
295295

296+
The `remember` and `rememberHidden` methods may be used to retrieve information from the context, while setting the context value to the value returned by the given closure if the requested information doesn't exist:
297+
298+
```php
299+
$permissions = Context::remember('user-permissions', function () use ($user) {
300+
return $user->permissions;
301+
});
302+
```
303+
296304
If you would like to retrieve all of the information stored in the context, you may invoke the `all` method:
297305

298306
```php

0 commit comments

Comments
 (0)