lundi 30 décembre 2019

How to destroy session when clicks on browser's back button

I am flashing a success message using session->flash() method in laravel. But when user clicks back button the message comes up again. How to fix this. My code for showing message is -

@if(Session::get('success') )
    <script>
        swal({
            text: "",
            button: localMsg.ok,

        }).then((isConfirm) => {
        });
    </script>
    @elseif(Session::get('error'))
    <script>
        swal({
            text: "",
            button: localMsg.ok,

        }).then((isConfirm) => {
        });
        awesomeAnalytics();

    </script>
@endif


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/37ueW0F
via IFTTT

Aucun commentaire:

Enregistrer un commentaire