I think you cannot use laravel to detect that. So, you have to use javascript to detect on the web.
Check this discussion. https://stackoverflow.com/questions/25806608/how-to-detect-browser-back-button-event-cross-browser
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I need to somehow detect that the user has pressed a browsers back button and reload the page.because i show cart count on that page if the page is not reload or refresh cart count not updated.
Please or to participate in this conversation.