Files

27 lines
576 B
PHP

<?php
namespace App\NotificationsChannels;
use Illuminate\Notifications\Notification;
class AppriseChannel
{
protected $apprise;
public function __construct(Apprise $apprise)
{
$this->apprise = $apprise;
}
/**
* Send the given notification.
*/
public function send(object $notifiable, Notification $notification)
{
$message = $notification->toApprise($notifiable);
return $this->apprise->send(notification: $message['content'], notification_content: $message["content"]['body'], user: $notifiable);
}
}