I think that is what you are looking for: https://vuex.vuejs.org/guide/state.html
For simple stuff session will do.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hi everyone, I'm creating a real estate application where the main page consists of a classic search menù with search parameters on the left, and search results on the right. Search results are displayed through VueJs: when search parameters change, the results on the right are rendered accordingly.
Then, when one of the results is clicked, the application goes to details page (that's a different route, with a different laravel blade template, classic php no Vue).
The problem is this: from the details page, when clicking on the back button, of course all previous search parameters are lost. Instead I need to go back with search parameters set, just like coming from an old form postback.
The only solution I came up with is to store all search params in session, check for this data in the controller and somehow send them to the component.
Any better solution? Thank you.
Please or to participate in this conversation.