mirror of
https://github.com/zoe-may/TDoG-Skin.git
synced 2025-01-19 06:57:24 +08:00
52 lines
960 B
PHP
52 lines
960 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace App\Notifications;
|
||
|
|
||
|
use Illuminate\Bus\Queueable;
|
||
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
||
|
use Illuminate\Notifications\Notification;
|
||
|
|
||
|
class SiteMessage extends Notification implements ShouldQueue
|
||
|
{
|
||
|
use Queueable;
|
||
|
|
||
|
public $title;
|
||
|
|
||
|
public $content;
|
||
|
|
||
|
public function __construct(string $title, $content = '')
|
||
|
{
|
||
|
$this->title = $title;
|
||
|
$this->content = $content;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the notification's delivery channels.
|
||
|
*
|
||
|
* @param mixed $notifiable
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function via($notifiable)
|
||
|
{
|
||
|
return ['database'];
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Get the array representation of the notification.
|
||
|
*
|
||
|
* @param mixed $notifiable
|
||
|
*
|
||
|
* @return array
|
||
|
*/
|
||
|
public function toArray($notifiable)
|
||
|
{
|
||
|
return [
|
||
|
'title' => $this->title,
|
||
|
'content' => $this->content,
|
||
|
];
|
||
|
}
|
||
|
}
|