Webhook Notifications driver

2.3.0 2022-02-15 02:53 UTC

This package is not auto-updated.

Last update: 2023-09-18 02:28:58 UTC


Latest Version on Packagist Software License Build Status StyleCI SensioLabsInsight Quality Score Code Coverage Total Downloads

This package makes it easy to send webhooks using the Laravel notification system. Supports 5.5+, 6.x, 7.x and 8.x.



You can install the package via composer:

composer require laravel-notification-channels/webhook


Now you can use the channel in your via() method inside the notification:

use NotificationChannels\Webhook\WebhookChannel;
use NotificationChannels\Webhook\WebhookMessage;
use Illuminate\Notifications\Notification;

class ProjectCreated extends Notification
    public function via($notifiable)
        return [WebhookChannel::class];

    public function toWebhook($notifiable)
        return WebhookMessage::create()
               'payload' => [
                   'webhook' => 'data'
            ->header('X-Custom', 'Custom-Header');

In order to let your Notification know which URL should receive the Webhook data, add the routeNotificationForWebhook method to your Notifiable model.

This method needs to return the URL where the notification Webhook will receive a POST request.

public function routeNotificationForWebhook()
    return '';

Available methods

  • data(''): Accepts a JSON-encodable value for the Webhook body.
  • query(''): Accepts an associative array of query string values to add to the request.
  • userAgent(''): Accepts a string value for the Webhook user agent.
  • header($name, $value): Sets additional headers to send with the POST Webhook.
  • verify(): Enable the SSL certificate verification or provide the path to a CA bundle


Please see CHANGELOG for more information what has changed recently.


$ composer test


If you discover any security related issues, please email instead of using the issue tracker.


Please see CONTRIBUTING for details.



The MIT License (MIT). Please see License File for more information.