onQueue('high'); } /** * Execute the job. */ public function handle(): void { $validator = Validator::make( ['webhook_url' => $this->webhookUrl], ['webhook_url' => ['required', 'url', new \App\Rules\SafeWebhookUrl]] ); if ($validator->fails()) { Log::warning('SendWebhookJob: blocked unsafe webhook URL', [ 'url' => $this->webhookUrl, 'errors' => $validator->errors()->all(), ]); return; } if (isDev()) { ray('Sending webhook notification', [ 'url' => $this->webhookUrl, 'payload' => $this->payload, ]); } $response = Http::post($this->webhookUrl, $this->payload); if (isDev()) { ray('Webhook response', [ 'status' => $response->status(), 'body' => $response->body(), 'successful' => $response->successful(), ]); } } }