PHP code example of seinoxygen / laravel-elastic-email
1. Go to this page and download the library: Download seinoxygen/laravel-elastic-email 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/ */
seinoxygen / laravel-elastic-email example snippets
public function build()
{
// You can set ad many models you want to relate with the outgoing email
$models = [
[$yourmodel->id, get_class($yourmodel)],
];
return $this
->subject("My Subject")
->view('my-view')
->with([
'models' => $models
]);
}
namespace app\Listeners;
use SeinOxygen\ElasticEmail\Events\WebhookCallReceived;
class WebhookCallListerner
{
public function handle(WebhookCallReceived $event)
{
$request = $event->request;
}
}