skip to Main Content

Laravel – How to use button as Livewire toggler

Blade for livewire component: <div> <input type="checkbox" class="form-checkbox" wire:model="collapsed" wire:click="toggleCollapsed"> @if ($collapsed) show icon for collapsed state @else show icon for expanded state @endif </div> Works as expected - $collapsed changed because of checkbox, appropriate icon shown. But usage of…

VIEW QUESTION
Back To Top
Search