PHP code example of sy-records / webhooks

1. Go to this page and download the library: Download sy-records/webhooks library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sy-records / webhooks example snippets


use Luffy\WebHook\Payload;
use Luffy\WebHook\Interfaces\HandlerInterface;

// 如果存在实现MessageInterface的request对象,可以传入
// 不传则从全局变量中获取
$payload = new Payload();
/** @var HandlerInterface $handler */
$handler = $payload->getHandler();