Download the PHP package mamadali/yii2-webhook without Composer
On this page you can find all versions of the php package mamadali/yii2-webhook. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mamadali/yii2-webhook
More information about mamadali/yii2-webhook
Files in mamadali/yii2-webhook
Package yii2-webhook
Short Description Yii2 send create and changes to webhook
License Apache-2.0
Informations about the package yii2-webhook
Yii2 Webhook Behavior
Helps you to send models changes to a webhook url
Installation
The preferred way to install this extension is through composer.
Either run
or add
to the require section of your composer.json
file.
then run migrations
Basic usage
first add to config.php or if use advanced project add to common/config/main.php
To send model change to webhook you need to add to your model
When any changes on your model, will be send data to webhook like this:
Advanced usage
You can add authentication to your webhook url, like this:
for use basic auth:
for use bearer auth:
you can change url and auth for send webhook in any model, like this:
you can send data to webhook only on specific scenarios or except scenarios, like this:
you can customize attributes to send in webhook, like this:
you can set excepted attributes, if set, will be send all attributes except the ones in this array
you can use 'when' property to send data only on when this function return true, like this:
you can send webhook with queue
to use queue you need first configure queue from Yii2 Queue Document
then you can use queue in your model, like this:
Advanced usage queue
you can override job in your config
and create WebhookJob in your namespace, like this:
All versions of yii2-webhook with dependencies
yiisoft/yii2-httpclient Version ~2.0.0
yiisoft/yii2-queue Version *