DEV Community

Discussion on: Global livewire notifications with SweetAlert

Collapse
 
saaberdev profile image
Mahfuzur Rahman Saber

Hey brother, can you please tell me how these parts are working ??

'method' => 'appointments:delete',
'params' => [], // optional, send params to success confirmation
'callback' => '', // optional, fire event if no confirmed

Collapse
 
ph7jack profile image
Pedro Henrique

Hello
in the key method, inform the livewire listener that will receive the event
the parameter key is to pass data to this event, like an id, name ..
the callback key is used when confirmation is denied, eg ask to delete, if the answer is no, call event X