1. Go to this page and download the library: Download webup/laravel-sendinblue 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/ */
declare(strict_types=1);
namespace App\Mail;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Mail\Mailable;
use Illuminate\Queue\SerializesModels;
use Webup\LaravelSendinBlue\SendinBlue; // <- you need this
use Webup\LaravelSendinBlue\SendinBlueTransport; // <- you need this
class MyMailable extends Mailable
{
use Queueable;
use SerializesModels;
use SendinBlue; // <- you need this
// ...
public function build()
{
return $this
->view([])
->subject(SendinBlueTransport::USE_TEMPLATE_SUBJECT) // use template subject
// ->subject('My own subject') // subject overridden
->sendinblue(
[
'template_id' => 84,
'tags' => ['offer'],
'params' => [
'FIRSTNAME' => 'John',
'LINK' => 'https://www.example.com',
'AMOUNT' => '29',
],
]
);
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.