mirror of
https://github.com/Cybrarist/Discount-Bandit.git
synced 2026-11-24 19:49:54 +01:00
27 lines
576 B
PHP
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);
|
|
|
|
}
|
|
}
|