We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 381d364 commit fb9b29dCopy full SHA for fb9b29d
context.md
@@ -250,14 +250,18 @@ $data = Context::all();
250
<a name="determining-item-existence"></a>
251
### Determining Item Existence
252
253
-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:
254
255
```php
256
use Illuminate\Support\Facades\Context;
257
258
if (Context::has('key')) {
259
// ...
260
}
261
+
262
+if (Context::missing('key')) {
263
+ // ...
264
+}
265
```
266
267
The `has` method will return `true` regardless of the value stored. So, for example, a key with a `null` value will be considered present:
0 commit comments