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, alertClass, alertIcon){ 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, "alert-success", "ti-check"); } function popWarningAlert(warningMsg){ popAlert(warningMsg, "alert-warning", "ti-bell"); } function popErrorAlert(errorMsg){ popAlert(errorMsg, "alert-danger", "ti-ban"); } popSuccessAlert(``); popWarningAlert(``); popErrorAlert(``); endSection() ?>