Skip to content

Commit 6cd5437

Browse files
committed
wip
1 parent a7c4346 commit 6cd5437

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

blade.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,17 @@ The `@session` directive may be used to determine if a [session](/docs/{{version
321321
@endsession
322322
```
323323

324+
<a name="context-directives"></a>
325+
#### Context Directives
326+
327+
The `@context` directive may be used to determine if a [context](/docs/{{version}}/context) value exists. If the context value exists, the template contents within the `@context` and `@endcontext` directives will be evaluated. Within the `@context` directive's contents, you may echo the `$value` variable to display the context value:
328+
329+
```blade
330+
@context('canonical')
331+
<link href="{{ $value }}" rel="canonical">
332+
@endcontext
333+
```
334+
324335
<a name="switch-statements"></a>
325336
### Switch Statements
326337

0 commit comments

Comments
 (0)