Level 5
Have you tried to bind it as #[Reactive] property?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a LW modal component that inherits its properties from a parent modal component. I am somehow not able to use the properties as parameters.
If this sounds confusing... in the code below, it renders the value of {{ $name }} inside the div without issues but it does not render it as the value of x-ref in the x-ref="{{ $name }}" statement.
Why?
<div>
<x-dialog-modal wire:model="showUserDialog" class="h-3/4">
<x-slot name="title">
{{ __('User') }}
</x-slot>
<x-slot name="content">
<div>
{{ $name }}
</div>
<div x-data="{}">
<div x-ref="{{ $name }}">
...
Please or to participate in this conversation.