Files
YNWA Fawzy 18edc929b4 Features:
- add apprise notifications to the system.

Fixes:
- Fix ntfy notification layout
- enhance readability of notifications.

Took 9 minutes
2024-10-20 22:44:43 +04:00

26 lines
513 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_content: $message["content"]);
}
}