Add items into a request object

David Carr

Laravel Framework Tutorials PHP & MySQL

To add additional items into the request use ->merge and pass in an array of attributes.

request()->merge($array);

The request object will now contain the new array items as part of its body.

Read articles directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Copyright © 2006 - 2025 DC Blog - All rights reserved.