PHP code example of michaelmannucci / webhook

1. Go to this page and download the library: Download michaelmannucci/webhook 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/ */

    

michaelmannucci / webhook example snippets




return [
    // Webhook url
    'webhook_url' => 'https://webhook.example.com/',

    // Which collections to pass
    'collections' => [
        'blog' => [
            'title',
            'absoluteUrl',
            'content',
            'related_entries' => [
                'categories' => [
                    'title',
                    'handle'
                ],
            ],
            'assets' => [
                'image' => [
                    'title',
                ],
            ]
        ],
        'events' => [
            'title',
            'absoluteUrl',
            'start_date',
            'location'
        ]
    ],
];