PHP code example of agirem / clario-laravel

1. Go to this page and download the library: Download agirem/clario-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/ */

    

agirem / clario-laravel example snippets


Mail::to($user)->send(new OtpCodeMail($code));

'clario' => [
    'transport' => 'clario',
],

public function headers(): Headers
{
    return new Headers(
        text: [
            'X-Clario-Idempotency-Key' => 'otp-'.$this->user->id.'-'.$this->codeId,
        ],
    );
}

Event::listen(EmailDelivered::class, function (EmailDelivered $event) {
    // $event->emailId, $event->data['metadata'], $event->eventId
});

public function headers(): Headers
{
    return new Headers(text: [
        'X-Clario-Metadata-order_id' => (string) $this->order->id,
    ]);
}
bash
php artisan vendor:publish --tag=clario-config