use Illuminate\Http\Request; $request = Request::create('/path/to/endpoint', 'GET', [ 'param1' => 'value1', 'param2' => 'value2', ]);
use Illuminate\Http\Request; $request = Request::capture(); $name = $request->input('name');In this example, we are first capturing the current request using the static `capture` method. We then can retrieve the value of the `name` parameter using the `input` method. The `Illuminate\Http\Request` class is part of the `illuminate/http` package library which is included with Laravel.