use Illuminate\Http\Request; $request = new Request(); $data = [ 'name' => 'John', 'email' => 'john@example.com' ]; $request->merge($data); // Access the merged data $name = $request->input('name'); $email = $request->input('email');In this example, we create a new Request instance and then merge the $data array with the request input data. We can then access the merged data using the input() method. The merge() method is a part of the Illuminate\Http\Request package, which is included in the Laravel web application framework.