@if(Route::currentRouteName() == 'admin.games.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 the database!", "Success!");
    @elseif (session('delete_success'))
    toastr.success("{!! session('delete_success') !!} was removed from the database.", "Success!");
    @endif
</script>
    @endif
@endif

@if(Route::currentRouteName() == 'admin.game.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("The update completed successfully!", "Success!");
</script>
    @endif
@endif
