PHP code example of rad-themes / alp-crm

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/ */

    

rad-themes / alp-crm example snippets


$expected = 'sha256='.hash_hmac('sha256', $request->getContent(), $secret);
abort_unless(hash_equals($expected, $request->header('X-Alp-Signature')), 401);

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
});
bash
composer update rad-themes/alp-crm
php artisan migrate