php - Create a Laravel Request object on the fly

PHOTO EMBED

Thu Jun 17 2021 04:38:46 GMT+0000 (UTC)

Saved by @mvieira

$myRequest = new Request();
$myRequest->request->add(['foo' => 'bar']);
var_dump($myRequest->foo);
content_copyCOPY

https://stackoverflow.com/questions/40262947/create-a-laravel-request-object-on-the-fly