has('message')) { $successMessage = session('message'); } if (session()->has('error')) { $errorMessage = is_array(session('error')) ? implode(session('error')) : session('error'); } /* // Uncomment this block if you want the errors listed line by line in the alert elseif (session()->has('errors')) { $errorMessage = ''; } */ ?>
section('additionalInlineJs') ?> function popAlert(message, alertType){ var alertClass = "alert-" + alertType; var alertIcon = alertType == "success" ? "ti-check" : "ti-" + alertType; var htmlString = ` `; $(window).scrollTop(0); $('#sk-alert').hide().empty().html(htmlString).fadeIn("slow", function(){ setTimeout(function(){ $('#sk-alert').fadeOut("slow"); }, 5000); }); } function popSuccessAlert(successMsg){ popAlert(successMsg, "success"); } function popWarningAlert(warningMsg){ popAlert(warningMsg, "warning"); } function popErrorAlert(errorMsg){ popAlert(errorMsg, "error"); } popSuccessAlert(``); popWarningAlert(``); popErrorAlert(``); endSection() ?>