Created
September 30, 2015 12:22
-
-
Save MwirabuaTimothy/f1acfc3c0221229c312f to your computer and use it in GitHub Desktop.
Laravel 5 Blade Partial template for displaying ToastrJS notifications - @include('partials.toastr')
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
@if(session('toastr')) | |
<link rel="stylesheet" href="{{ asset('/plugins/toastr/toastr.min.css') }}"> | |
<script src="{{ asset('/plugins/toastr/toastr.min.js') }}" type="text/javascript"></script> | |
<style type="text/css" media="screen"> | |
.toast-top-right { | |
top: 50px; | |
} | |
</style> | |
<script> | |
$(document).ready(function() { | |
toastr.options.timeOut = 5000; | |
toastr.options.extendedTimeOut = 5000; | |
toastr.{{ session()->remove('toastr.level') }} | |
("{!! session()->remove('toastr.message') !!}"); | |
}); | |
</script> | |
@endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment