PHP code example of omaralalwi / laravel-jobs-metrics
1. Go to this page and download the library: Download omaralalwi/laravel-jobs-metrics 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/ */
omaralalwi / laravel-jobs-metrics example snippets
namespace App\Jobs;
use Omaralalwi\JobsMetrics\Traits\HasJobsMetricTracker;
class ProcessPodcast implements ShouldQueue
{
use HasJobsMetricTracker;
// Your job implementation...
}
return [
// Enable or disable metrics tracking globally
'track_jobs_metrics' => (bool) env('TRACK_JOBS_METRICS', true),
// Log errors that occur during metrics tracking
'log_errors' => (bool) env('JOBS_METRICS_LOG_ERRORS', true),
];