1. Go to this page and download the library: Download warrickbayman/incus 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/ */
warrickbayman / incus example snippets
use Incus\Incus;
use Incus\Listener;
class MyMandrillApp extends Controller
{
public funtion webhooks()
{
Incus::listen(function(Listener $listener)
{
$listener->send(function($event)
{
...
...
})
->open(function($event)
{
...
...
});
->softBounce(function($event)
{
...
...
});
});
}
}
class MyMandrillApp extends Controller
{
public function webhooks()
{
$events = Incus::listen();
foreach ($events as $event) {
echo "Event occured: " . $event->at()->format('d F Y');
}
}
}