PHP code example of spatie / flare-debug-sender
1. Go to this page and download the library: Download spatie/flare-debug-sender 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/ */
spatie / flare-debug-sender example snippets
return [
// Other contents ..
'sender' => [
'class' => \Spatie\FlareDebugSender\FlareDebugSender::class,
'config' => [
'passthrough_errors' => true,
'passthrough_traces' => true,
'passthrough_zipkin' => false,
'replace_tracing_ids' => true,
'replace_tracing_times' => true,
'print_full_payload' => false,
'print_endpoint' => false,
'print_resource' => false,
'channel' => \Spatie\FlareDebugSender\Channels\LaravelLogDebugChannel::class,
'channel_config' => [],
'sender' => CurlSender::class,
'sender_config' => [
'curl_options' => [
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
],
],
],
],
]
$config->sendUsing(
\Spatie\FlareDebugSender\FlareDebugSender::class,
[
'passthrough_errors' => true,
'passthrough_traces' => true,
'passthrough_zipkin' => false,
'replace_tracing_ids' => true,
'replace_tracing_times' => true,
'print_full_payload' => false,
'print_endpoint' => false,
'print_resource' => false,
'channel' => \Spatie\FlareDebugSender\Channels\FileDebugChannel::class,
'channel_config' => [
'file' => 'path/to/your/file.log',
],
'sender' => CurlSender::class,
'sender_config' => [
'curl_options' => [
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
],
],
]
)
return [
// Other contents ...
'sender' => [
'class' => \Spatie\FlareDebugSender\FlareDebugSender::class,
'config' => [
'passthrough_errors' => true,
'passthrough_traces' => true,
'passthrough_zipkin' => false,
'replace_tracing_ids' => true,
'replace_tracing_times' => true,
'print_full_payload' => false,
'print_endpoint' => false,
'print_resource' => false,
'channel' => \Spatie\FlareDebugSender\Channels\RayDebugChannel::class,
'channel_config' => [],
'sender' => CurlSender::class,
'sender_config' => [
'curl_options' => [
CURLOPT_SSL_VERIFYHOST => 0,
CURLOPT_SSL_VERIFYPEER => 0,
],
],
],
],
]
'channel' => FileDebugChannel::class,
'channel_config' => [
'file' => 'path/to/your/file.log',
],
bash
php artisan vendor:publish --tag=flare-config