Blade parsing/usage - AlpineJS/Livewire entangle #41472
-
I have component with code like this:
When I have hardcoded "enabled" string, everything is working fine. The problem is that I would like to have it in variable. When using like this:
I'm getting Blade parse error:
Is it Blade bug or this need some fancy way to use variable here? Disclaimer: I tried to used also:
but then getting AlpineJS console errors although page source seems fine. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I have had this issue before. @entangle is already a blade directive, even if your IDE might not display it as such so no need for extra brackets or anything. You should be able to just do:
|
Beta Was this translation helpful? Give feedback.
I have had this issue before.
@entangle is already a blade directive, even if your IDE might not display it as such so no need for extra brackets or anything.
You should be able to just do:
<button type="button" x-data="{ on: @entangle($wireModel).defer }">test</button>