I have an edit done with a click to edit a resource, for example:
{{Form::model( $post ,['action'=> [' PostController@update ', 'id' => $post->id], 'method' => 'post'])}}
What generates a form with an action
http://example.com/posts/edit/123
And my fields containing text and hidden inputs
When you see this URL, itβs very easy for an unscrupulous user to update other messages.
How to protect a route so that it works if the identifier manipulates the inspector? Is there a built-in wat to tokenize the identifier to make sure it matches? Can this also apply to all hidden inputs?
thanks
EDIT:
An example of using my hidden fields: My messages are usually questions and answers, when a user tries to add an answer to a question, I set question_id as a hidden field and I want to check that it is not controlled.
source share