Create a Laravel Request object on the fly
<p>I'm handling data in one controller and want to pass it further into another controller to avoid duplicate code.</p>

<p>Is there a way to set up a Request object that is needed in the other controller's <code>store</code>-method? I've traced down the Request inheritance and came to Symfony's Request object which has a <code>request</code> property that is in fact a <code>ParameterBag</code> that holds a method <code>add</code> to add parameters with values to it.</p>

<p>I've tried the following but I'm getting <code>null</code> as result:</p>

<pre><code>$myRequest = new Request();
$myRequest-&gt;request-&gt;add(['foo' =&gt; 'bar']);
var_dump($myRequest-&gt;foo);
</code></pre>

<p>I'm on Laravel 5.1 for this project.</p>