Skip to content

Commit a49dfa7

Browse files
authored
Update when helper example for rendering HTML attributes. (laravel#9898)
Josh Cirre DM'd me that he was having an issue with using when() with livewire, and noted that the docs example shows it using `{{` blade tags, where it should be using `{!!` to prevent output escaping. quick fix!
1 parent 81330e8 commit a49dfa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

helpers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2317,7 +2317,7 @@ The `when` function returns the value it is given if a given condition evaluates
23172317
The `when` function is primarily useful for conditionally rendering HTML attributes:
23182318

23192319
```blade
2320-
<div {{ when($condition, 'wire:poll="calculate"') }}>
2320+
<div {!! when($condition, 'wire:poll="calculate"') !!}>
23212321
...
23222322
</div>
23232323
```

0 commit comments

Comments
 (0)