1. Go to this page and download the library: Download rad-themes/alp-crm 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/ */
use RadThemes\AlpCrm\Events\CrmEvent;
Event::listen(function (CrmEvent $event) {
if ($event->name === 'invoice.paid') {
// $event->payload, $event->contact, $event->context
}
});
use RadThemes\AlpCrm\Automations\Actions;
Actions::extend('slack', 'Post to Slack', function (array $step, ?Contact $contact, array $context) {
// …
return 'Posted to Slack'; // shown in the run log
});