php - Create a Laravel Request object on the fly

PHOTO EMBED

Fri Jul 23 2021 21:10:42 GMT+0000 (Coordinated Universal Time)

Saved by @mvieira

$request = new \Illuminate\Http\Request();

$request->replace(['foo' => 'bar']);

dd($request->foo);
content_copyCOPY

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