Created
April 3, 2017 10:58
-
-
Save dam1r89/e53c4dfbc48af187e7e0d89275926636 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script id="sweetMessages" type="application/json">{!! json_encode(array_only(session()->all(), ['success', 'error', 'warning'])) !!}</script> | |
<script> | |
var sweetMessages = JSON.parse($('#sweetMessages').html()); | |
setTimeout(function () { | |
Object.keys(sweetMessages).forEach(function (key) { | |
return swal(sweetMessages[key], '', key); | |
}); | |
}, 0); | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment