I want to replace the content inside a request of Laravel. How can I do that? To replace the content and save inside the same request?
Asked
Active
Viewed 390 times
-1
-
Welcome to SO. Please try searching before posting a new question. I searched for "*laravel replace data in request*" and found man answers. – Don't Panic Feb 07 '22 at 22:15
-
Does this answer your question? [How to change value of a request parameter in laravel](https://stackoverflow.com/questions/36812476/how-to-change-value-of-a-request-parameter-in-laravel) – Don't Panic Feb 07 '22 at 22:15
1 Answers
0
You can use the replace()
method.
Example
$request->request->replace($newData);

Karl Hill
- 12,937
- 5
- 58
- 95