I am using laravel 8. when i login and try to close browser or tab then before close I want ask confirmation massage with ok and cancel button. If user clicks ok then logout user if cancel stay on same page. I have tried javacript beforeunload method but didnot work.as if fire on all button and link click.
in laravel i tried session.php ‘expire_on_close’ set true but not working.