'Replace content of request laravel

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?

enter image description here



Solution 1:[1]

You can use the replace() method.

Example

$request->request->replace($newData);

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Karl Hill