Files
2025-05-18 15:42:13 +04:00

26 lines
557 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_title: ['title' => $message["title"]], notification_content: $message["message"]);
}
}