1. Go to this page and download the library: Download phpinnacle/porta 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/ */
phpinnacle / porta example snippets
use App\Jobs\SyncContact;
use PHPinnacle\Porta\Handler;
use PHPinnacle\Porta\PortaPlugin;
$panel->plugin(
PortaPlugin::make()->handle(
new Handler(
type: 'crm.contact.updated',
label: 'CRM contact updated',
invoker: function (array $payload) {
SyncContact::dispatch($payload);
},
example: '{"contact":{"id":"example-id"}}',
),
),
);