Hi All,
After one month I was able to find a solution for this matter. Evidently, you can use Sweet Alerts within your Javascript if you are already using "realrashid/sweet-alert".
You just need to declare following on top of your script:
$(document).ready(function() {
//SweetAlert2 Toast
const Toast = Swal.mixin({
toast: true,
position: 'top-end',
showConfirmButton: false,
timer: 1000
});
});
And then call toast:
Toast.fire({
type: 'success',
title: 'Data updated.'
});
Simple as that. No need to call in anything else if you already installed "realrashid/sweet-alert" package with your laravel project.
I am posting this here for anyone who may need to use realrashid/sweetalert in their javascript code. Hoping someone may find it useful.
Thanks.