Dinesh Uprety
@dineshuprety ·
Public
Inspect HTTP fake request URIs
PHPLaravel 13 API example based on official Laravel documentation. Source: https://laravel.com/framework/docs/changelog#add-clientrequesturi
PHP
CodeSnap // free canvas
Inspect HTTP fake request URIs
<?php
use Illuminate\Http\Client\Request;
use Illuminate\Support\Facades\Http;
Http::assertSent(fn (Request $request) =>
$request->uri()->path() === '/api/users'
&& $request->uri()->query()->integer('page') === 2
);
// Further reading: https://laravel.com/framework/docs/changelog#add-clientrequesturi