PHP code example of alfredosend / laravel
1. Go to this page and download the library: Download alfredosend/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/ */
alfredosend / laravel example snippets
use Alfredo\AlfredoClient;
$client = new AlfredoClient(
apiKey: config('services.alfredo.key'),
clientId: config('services.alfredo.client_id'),
);
$result = $client->sendTransactional(config('services.alfredo.welcome_template_id'), [
'to' => [['email' => $user->email, 'name' => $user->name]],
'data' => ['name' => $user->name],
]);