You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: context.md
+4-3Lines changed: 4 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -296,9 +296,10 @@ Context::get('breadcrumbs');
296
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
297
298
298
```php
299
-
$permissions = Context::remember('user-permissions', function () use ($user) {
300
-
return $user->permissions;
301
-
});
299
+
$permissions = Context::remember(
300
+
'user-permissions',
301
+
fn () => $user->permissions,
302
+
);
302
303
```
303
304
304
305
If you would like to retrieve all of the information stored in the context, you may invoke the `all` method:
0 commit comments