I have a function in livewire component like this :
public function deleteAccount($id,$approve){
// my code ...
}
and I want to emit this function from javascript. I tried :
<script>
window.livewire.emit('deleteAccount', data => {123, true});
</script>
But it does not worked. Any suggestion ?