myvideogamelist.com/resources/views/partials/footer-scripts/game-lists/_toasts.blade.php

56 lines
1.7 KiB
PHP
Raw Permalink Normal View History

@if(Route::currentRouteName() == 'games.list.index')
@if (session('create_success') || session('delete_success'))
<script type="text/javascript">
toastr.options = {
"closeButton": true,
"debug": false,
"newestOnTop": false,
"progressBar": false,
"positionClass": "toastr-top-right",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "5000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "hide"
};
@if (session('create_success'))
toastr.success("{!! session('create_success') !!} was added to your list!", "Success!");
@elseif (session('delete_success'))
toastr.success("{!! session('delete_success') !!} was removed from your list.", "Success!");
@endif
</script>
@endif
@endif
@if(Route::currentRouteName() == 'games.list.edit')
@if (session('edit_success'))
<script type="text/javascript">
toastr.options = {
"closeButton": true,
"debug": false,
"newestOnTop": false,
"progressBar": false,
"positionClass": "toastr-top-right",
"preventDuplicates": false,
"onclick": null,
"showDuration": "300",
"hideDuration": "1000",
"timeOut": "5000",
"extendedTimeOut": "5000",
"showEasing": "swing",
"hideEasing": "linear",
"showMethod": "fadeIn",
"hideMethod": "hide"
};
toastr.success("Your entry was successfully updated! Do you want to go to <a class='text-dark text-decoration-underline' href='/list'>your list</a>?", "Success!");
</script>
@endif
@endif