app/Notifications/SimpleNotification.php
<?php
namespace App\Notifications;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
use NotificationChannels\Discord\DiscordChannel;
use NotificationChannels\Discord\DiscordMessage;
class SimpleNotification extends Notification implements ShouldQueue
{
use Queueable;
public $content;
/**
* Create a new notification instance.
*
* @return void
*/
public function __construct($content)
{
$this->content = $content;
}
/**
* Get the notification's delivery channels.
*
* @param mixed $notifiable
*
* @return array
*/
public function via($notifiable)
{
return [DiscordChannel::class];
}
public function toDiscord($notifiable)
{
return DiscordMessage::create($this->content);
}
}