Skip to content

Instantly share code, notes, and snippets.

@abdasis
Last active February 12, 2022 01:34
Show Gist options
  • Save abdasis/1d9f18beb9c642f00da81a1b5ba76a54 to your computer and use it in GitHub Desktop.
Save abdasis/1d9f18beb9c642f00da81a1b5ba76a54 to your computer and use it in GitHub Desktop.
Inertia alert with toast
function handleSubmit(event) {
event.preventDefault();
Inertia.post(route('siswa.simpan'), values, {
onSuccess: () => {
toast.success("Data berhasil disimpan");
},
onError: (error) => {
toast.error(error);
}
});
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment