PHP code example of developmint / netlify-build-hook
1. Go to this page and download the library: Download developmint/netlify-build-hook 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/ */
developmint / netlify-build-hook example snippets
php
$client = new \GuzzleHttp\Client();
$id = 'XXX'
$hook = new \Developmint\NetlifyBuildHook\NetlifyBuildHook($client, $id);
// Alternatively
// With title
$hook = new \Developmint\NetlifyBuildHook\NetlifyBuildHook($client, $id, 'My custom title');
// With branch
$hook = new \Developmint\NetlifyBuildHook\NetlifyBuildHook($client, $id, null, 'other-branch');
// With everything
$hook = new \Developmint\NetlifyBuildHook\NetlifyBuildHook($client, $id, 'My custom title', 'branch-name');
php
$hook->trigger();