Answers for "how to use livewire on blade component"

PHP
0

livewire functions inside blade

################ Livewire controller file ####################
public function addTodo($id, $name)
{
    ...
}

################ Blade file ####################

<button wire:click="addTodo({{ $todo->id }}, '{{ $todo->name }}')">
    Add Todo
</button>
Posted by: Guest on March-09-2022

Code answers related to "how to use livewire on blade component"

Browse Popular Code Answers by Language