Video
Description
Laravel Spy is a lightweight package to track and log outgoing HTTP requests
Once installed and configured, Laravel Spy automatically tracks all outgoing HTTP requests made using Laravel's Http facade or HTTP client. The package logs the following details for each request:
- The full URL of the request
- The HTTP method (e.g., GET, POST, PUT)
- Request Headers
- Request Body
- Response Header
- Response Body
- Response HTTP Status code
- Request duration (milliseconds)
Example:
After installing laravel-spy and publishing the configuration, any usage of Laravel's HTTP client (for example, in your controllers or jobs) will be automatically logged.
Laravel Spy will log the details of this outgoing request to the http_logs table in your database.
Http::get('https://github.com/farayaz/laravel-spy/');
Related Content on Laravel Daily
Video
Recent Courses on Laravel Daily
[NEW] Laravel Boost: Deeper Practical Dive
8 lessons
32 min
Mobile Apps: React Native vs Flutter vs NativePHP?
8 lessons
55 min
Next.js Basics for Laravel Developers
11 lessons
58 min