legrisch / statamic-webhooks
A Statamic addon to register webhooks for Statamic events.
Package info
github.com/legrisch/statamic-webhooks
Type:statamic-addon
pkg:composer/legrisch/statamic-webhooks
Requires
- php: ^8.1
- mpbarlow/laravel-queue-debouncer: ^3.0
- statamic/cms: ^5
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This Statamic addon provides an easy to use interface to register webhooks for certain Statamic Events. Trigger deployments or microservices with ease.
Features
- Easy to use interface
- Custom headers per webhook
- Choose to include payload
- Enable/disable webhooks and headers
- Efficient concurrent execution of POST requests
- Debounced webhooks (when using an async queue driver)
- Ability to use a custom request body per webhook
Installation
Run composer require legrisch/statamic-webhooks
In case you want to debounce the webhooks, make sure to setup an async queue driver.
Usage
After installation, visit the control panel to add webhooks: Tools → Webhooks.
To manually trigger a webhook call it like this:
$success = EventListener::triggerByWebhookName('webhook-name')
If called directly, debouncing is not considered.
License
This project is licensed under the MIT License.
