N
N
Nina Fineberg2020-08-28 04:33:57
Laravel
Nina Fineberg, 2020-08-28 04:33:57

How to not accept get-parameters in Laravel when clicking the back button in the browser?

Dear experts! Tell me, how in Laravel not to accept get-parameters when clicking back in the browser? Those. when a person enters the page and presses the button, I run a function

public function CreateMeetingToFreeManadger(Request $request) {
//...toDO
}

but the problem is that when it presses back the function is run again even though I don't need it.
Thanks in advance!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Ukolov, 2020-08-28
@alexey-m-ukolov

It is impossible to understand that a person clicked on the Back button from the server. Therefore, any actions are usually implemented through post requests - there are much fewer problems of this kind with them, because the body with the request parameters is only in one place - in the form on the page. Well, even browsers now store it and offer to resend it when the page is refreshed.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question