I process data in one controller and want to transfer it further to another controller to avoid code duplication.
Is there a way to configure the request object that is needed in another controller storemethod? I traced the request inheritance and came up with a Symfony Request object, which has a property requestthat is actually ParameterBagthat contains a method addfor adding parameters with values ββto it.
I tried the following, but I get nullas a result:
$myRequest = new Request();
$myRequest->request->add(['foo' => 'bar']);
var_dump($myRequest->foo);
I am on Laravel 5.1 for this project.
source
share