legrisch / statamic-webhooks
A Statamic addon to register webhooks for Statamic events.
Installs: 39
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:statamic-addon
Requires
- php: ^7.3 || ^8.0
- mpbarlow/laravel-queue-debouncer: ^2.2
- statamic/cms: ^3.1
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.