Skip to content
Merged
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
6 changes: 5 additions & 1 deletion context.md
Original file line number Diff line number Diff line change
Expand Up @@ -250,14 +250,18 @@ $data = Context::all();
<a name="determining-item-existence"></a>
### Determining Item Existence

You may use the `has` method to determine if the context has any value stored for the given key:
You may use the `has` and `missing` methods to determine if the context has any value stored for the given key:

```php
use Illuminate\Support\Facades\Context;

if (Context::has('key')) {
// ...
}

if (Context::missing('key')) {
// ...
}
```

The `has` method will return `true` regardless of the value stored. So, for example, a key with a `null` value will be considered present:
Expand Down