Replies: 1 comment
-
I use assign the listener in the component, so that will be |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
How do I translate this..
<button wire:click="edit({{ $student->id }})">Edit</button>
To:
Button::add('edit')
->caption('Edit')
->class('text-indigo-500 cursor-pointer px-3 py-2 m-1 rounded text-sm')
->emitTo('contact.crud', 'edit', ['$contact' => 'id']), <-- I tried emit and emitTo
This is my Livewire component App\Http\Livewire\contact\crud.php
public function edit($id)
{
$contact = Contact::findOrFail($id);
$this->contact_id = $id;
$this->fullname = $contact->fullname;
$this->email = $contact->email;
Any help is appreciated, thanks!
Beta Was this translation helpful? Give feedback.
All reactions