lasthourcloud/app/Notifications/Internal/GeneralNotification.php
2023-08-16 16:03:30 +02:00

28 lines
587 B
PHP

<?php
namespace App\Notifications\Internal;
use App\Notifications\Channels\DiscordChannel;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
class GeneralNotification extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(public string $message)
{}
public function via(object $notifiable): array
{
$channels[] = DiscordChannel::class;
return $channels;
}
public function toDiscord(): string
{
return $this->message;
}
}