@shot_gamer First of all wrap your code with 3 ` so that it's readable. :)
BTW, check the following link to get some idea.
https://stackoverflow.com/questions/39839737/add-an-anchor-to-laravel-redirect-back
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello! Need help. There is a list of records with pagination. URL: /admin/reviews
Post editing form is on a separate page: /admin/reviews/45/edit
When saving changes to the record, I would like to return the user to the previous page, given the page number of the page navigation on which the user was. Those. for example, if the user went to edit the post from the page admin/reviews?page=6 , return him to this page.
What I tried:
On the record list page, I saved the URL of the current page in session()->flash('back_url', url()->full()) , then in the post editing form I got the saved URL and redirected the user back. However, there is a problem here, if you move between pages in a list, then url()->full() already produces something like: /livewire/message/admin.table Sorry for the English, I'm writing through a translator.
Please or to participate in this conversation.