Download the PHP package custom-d/webhook-registry without Composer

On this page you can find all versions of the php package custom-d/webhook-registry. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package webhook-registry

Webhook Registry

Build Status styleci Scrutinizer Code Quality SensioLabsInsight Coverage Status

Packagist Packagist Packagist

A wrapper for spatie/laravel-webhook-server that provides a simple & flexible webhook registry, allows you to expose any Laravel Event as a webhook, and provides out-of-the-box logging of webhook results.

Installation

Install via composer

Publish Configuration File

Usage

1. Trigger registered webhooks via events

Implement the CustomD\WebhookRegistry\Contracts\ShouldDeliverWebhooks contract on any Laravel Event, and you'll be able to register webhooks that will be fired on this event.

This contract defines several methods that need to be defined on your event, which will help provide the payload details.

Method Purpose
getWebhookPayload Returns the payload to send to the Spatie Webhook call. Useful if you want to completely override the payload.
getWebhookContext Returns the payload context field. Useful if you want to set a different property. Defaults to returning the ->context property from the event. If this property is Arrayable, we'll call ->toArray(). You can overload this method on your event if you want to customise this behaviour.
getWebhookEventName Returns the event name you want to expose in the payload. Useful for endpoints who recieve multiple different types of event to determine how to handle calls. By default, this is the value of the ->webhookEventName property from the event, otherwise we fall back to the event class name.
shouldDeliverWebhook Whether to deliver webhooks for this event. Defaults to true.

Your payload must define a body, but can also define tags and meta information for passing to Spatie\WebhookServer\WebhookCall.

2. Register webooks

Create webhook endpoints direction using the CustomD\WebhookRegistry\Models\WebhookEndpoint model, or use the facade WebhookRegistry::registerEndpoint.

By default, we'll verify SSL certificates on outgoing webhook connections. If you want to disable SSL verification, you can pass false to the registerEndpoint function.

3. Bind events to an endpoint

Associate a webhook event to an endpoint with the CustomD\WebhookRegistry\Model\WebhookEvent model, or using the facade WebhookRegistry::registerEvent.

Models

Customise the WebhookEvent model in order to add logic about when events should fire. In config/webhook-registry.php you will see the models being used in models -> events. You can make your own models by implementing the appropriate contract, and updating the config file.

If you need to modify the WebhookRequest logging table, note that it doesn't need a contract and can be overridden as needed, but ensure the original fields exist, or define appropriate attribute mappings.

Custom 'dispatchable' logic

To determine which events are dispatchable in a given execution, you must set a scopeWhereDispatchable on the WebhookEvent model. This scope will be used when finding events that should be fired.

By default this scope doesn't do any filtering.

Security

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

Credits

This package is bootstrapped with the help of melihovv/laravel-package-generator.


All versions of webhook-registry with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/support Version ^9.0|^10.0|^11.0
spatie/laravel-webhook-server Version ^3.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package custom-d/webhook-registry contains the following files

Loading the files please wait ....