mirror of
https://github.com/Cybrarist/Discount-Bandit.git
synced 2026-11-24 19:49:54 +01:00
26 lines
547 B
PHP
26 lines
547 B
PHP
<?php
|
|
|
|
namespace App\NotificationsChannels;
|
|
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class GotifyChannel
|
|
{
|
|
protected $gotify;
|
|
|
|
public function __construct(Gotify $gotify)
|
|
{
|
|
$this->gotify = $gotify;
|
|
}
|
|
|
|
/**
|
|
* Send the given notification.
|
|
*/
|
|
public function send(object $notifiable, Notification $notification)
|
|
{
|
|
$message = $notification->toGotify($notifiable);
|
|
|
|
return $this->gotify->send(notification: $message, notification_content: $message["message"],user: $notifiable);
|
|
}
|
|
}
|