Hi, my name is David Carr and I'm a PHP Developer.


Blog Archives Categories Authors About Me Open Source Books Contact Me

Sponsor Me

Help support the blog so that I can continue creating new content!

My Latest Book

Laravel: The Modular way

Learn how to build modular applications with Laravel Find out more

Add items into a request object

Laravel Framework | PHP & MySQL | Tutorials

David Carr

Add items into a request object

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.

Copyright © 2009 - 2022 David Carr. All code MIT license. All rights reserved.