Fixed - should've set the wire:model attribute to state.enabled.
Hope this helps someone in future!
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I'm having trouble getting a checkbox working in Livewire. Example code:
Component class
public Checkbox extends Component {
public $enabled = false;
public function render()
{
$this->example = (bool) auth()->user()->example;
return view('components.en-checkbox');
}
}
Parent view (update-profile-information-form.blade.php)
<div class="col-span-6 sm:col-span-4">
<x-en-checkbox id="enabled" wire:model.defer="state.enabled" />
<x-jet-label for="enabled" value="{{ __('Enable meee') }}" />
<x-jet-input-error for="enabled" class="mt-2" />
</div>
Component view
<input wire:model="enabled" type="checkbox" {{ $enabled ? 'checked' : '' }} {!! $attributes->merge(['class' => '']) !!}>
The view loads as expected and I can output the default $enabled value but when I tick the checkbox an error modal appears which reads: Property [$example] not found on component: [laravel.jetstream.http.livewire.update-profile-information-form]
From the error it looks like it's looking at the parent Component for the public property, rather than the nested Component. Any idea why this might be?
Please or to participate in this conversation.