You've already forked laravel-mail
Creating BMailChannel
This commit is contained in:
@@ -20,6 +20,11 @@ class BMailApi
|
||||
$this->api_key = $api_key;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $template
|
||||
* @return \Psr\Http\Message\StreamInterface
|
||||
* @throws BMailException
|
||||
*/
|
||||
public function send($template)
|
||||
{
|
||||
$url = config('bmail.api_url');
|
||||
|
||||
17
src/Broadcasting/BMailChannel.php
Normal file
17
src/Broadcasting/BMailChannel.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace BMail;
|
||||
|
||||
use Illuminate\Notifications\Notification;
|
||||
|
||||
|
||||
class BMailChannel
|
||||
{
|
||||
public function send($notifiable, Notification $notification)
|
||||
{
|
||||
$template = $notification->toTemplate($notifiable);
|
||||
|
||||
return (new BMailApi(config("bmail.api_key")))->send($template);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user