Download the PHP package syehan/webhook-plugin without Composer
On this page you can find all versions of the php package syehan/webhook-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download syehan/webhook-plugin
More information about syehan/webhook-plugin
Files in syehan/webhook-plugin
Package webhook-plugin
Short Description Webhooks allow external services to be notified when certain events happen. When the specified events happen, we’ll send a POST request to each of the URLs you provide.
License MIT
Homepage https://github.com/syehan/webhook-plugin
Informations about the package webhook-plugin
OctoberCMS Webhook
Use syehan/webhook-plugin
. A webhook is a way for an app to provide information to another app about a particular event. The way the two apps communicate is with a simple HTTP request.
Installation
1 - You can install the package via composer:
2 - Now publish the migration for webhook tables:
Note: It will generate migration table syehan_webhook_webhooks
.
Required Dependency
This plugin required dependency by Spatie Webhook Server (https://github.com/spatie/laravel-webhook-server) If there's some trouble, here's another way to do :
You can install it by :
Or, Install composer merge plugin like this :
Next, adding allow plugins configuration in your composer.json :
Then, adding extra configuration in your composer.json :
Last but not least,
Config Webhook
If your have any setup for webhook server please make sure to copy our config below and paste in config/webhook-server.php
.
Registering your model
In Default we already registered the RainLab.User Model to this plugin. And there's two way to implement the webhook :
1 - By observing your model :
2 - Or, more creative way is :
The second way of implementation is more flexible, we created function inside the behavior class like this :
It means, you able to call your webhook in your own way, for example :
or
after that, you must registering your event in config/webhook-server.php
like this :
Lastly, create your webhook in the menu settings, create some request payload to other app domain and activate it.
Testing The Webhook
We recommend you to test using request baskets (https://rbaskets.in/web) to make sure the webhook is running well.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Syehan (Author)
License
The MIT License (MIT). Please see License File for more information.
All versions of webhook-plugin with dependencies
composer/installers Version ~1.0
spatie/laravel-webhook-server Version ^3.4