PHP code example of anym0re / laravel-http-client-logger
1. Go to this page and download the library: Download anym0re/laravel-http-client-logger library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
anym0re / laravel-http-client-logger example snippets
// bootstrap/app.php
$app->register(Bilfeldt\LaravelHttpClientLogger\LaravelHttpClientLoggerServiceProvider::class);
// If you want to use the Facades provided by the package
$app->withFacades();
Http::log()->get('https://example.com'); // uses the configured logger and filter
Http::logWhen($condition)->get('https://example.com'); // uses the configured logger and filter
Http::log(['note' => 'Something to log'])->get('https://example.com');
// or
Http::logWhen($condition, ['note' => 'Something to log'])->get('https://example.com');