PHP code example of sabbajohn / pulse-laravel
1. Go to this page and download the library: Download sabbajohn/pulse-laravel 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/ */
sabbajohn / pulse-laravel example snippets
'credentials_resolver' => App\Support\PulseTenantCredentials::class,
use Sabbajohn\PulseLaravel\Facades\Pulse;
Pulse::emails()->sendAsync([
'to' => [['email' => '[email protected] ']],
'subject' => 'Processando',
'html' => '<p>Recebemos sua solicitacao.</p>',
]);
Pulse::emails()->ingestBounce([
'email_id' => 154,
'bounce_type' => 'hard',
'recipient' => '[email protected] ',
'reason' => 'Mailbox unavailable',
]);
Pulse::campaigns()->update(42, [
'name' => 'Newsletter atualizada',
'channel' => 'email',
'template_source_type' => 'html',
'template_source' => '<p>Oi</p>',
'compiled_html' => '<p>Oi</p>',
]);
use Sabbajohn\PulseLaravel\PulseClientFactory;
$pulse = app(PulseClientFactory::class)->make([
'base_url' => $tenant->pulse_base_url,
'api_token' => $tenant->pulse_api_token,
]);
DB::transaction(function () use ($input) {
$customer = Customer::create($input);
app(\Sabbajohn\PulseLaravel\Provisioning\PartnerProvisioner::class)
->enqueue('customer-'.$customer->id, ['name' => $customer->name]);
});
bash
php artisan vendor:publish --tag=pulse-provisioning-migrations
php artisan migrate