isDirty('status') && $crawlShotJob->webhook_url) { $eventsFilter = $crawlShotJob->webhook_events_filter ?? ['queued', 'processing', 'completed', 'failed']; // Don't fire webhook if filter is empty array if (empty($eventsFilter)) { return; } // Only fire webhook if current status is in the filter if (in_array($crawlShotJob->status, $eventsFilter)) { WebhookService::send($crawlShotJob); } } } }