Visitor management app with SSO, kiosk, badges, reports, and Gitea CI deploy to frontdesk.ladill.com. Co-authored-by: Cursor <cursoragent@cursor.com>
41 lines
1.0 KiB
PHP
41 lines
1.0 KiB
PHP
<?php
|
|
|
|
namespace App\Notifications;
|
|
|
|
use Illuminate\Bus\Queueable;
|
|
use Illuminate\Contracts\Queue\ShouldQueue;
|
|
use Illuminate\Notifications\Notification;
|
|
|
|
class FrontdeskAlertNotification extends Notification implements ShouldQueue
|
|
{
|
|
use Queueable;
|
|
|
|
/**
|
|
* @param array<string, mixed> $payload
|
|
*/
|
|
public function __construct(
|
|
public string $title,
|
|
public string $message,
|
|
public array $payload = [],
|
|
) {}
|
|
|
|
/** @return list<string> */
|
|
public function via(object $notifiable): array
|
|
{
|
|
return ['database'];
|
|
}
|
|
|
|
/** @return array<string, mixed> */
|
|
public function toDatabase(object $notifiable): array
|
|
{
|
|
return [
|
|
'title' => $this->title,
|
|
'message' => $this->message,
|
|
'icon' => $this->payload['icon'] ?? 'bell',
|
|
'url' => $this->payload['url'] ?? null,
|
|
'event' => $this->payload['event'] ?? null,
|
|
'visit_id' => $this->payload['visit_id'] ?? null,
|
|
];
|
|
}
|
|
}
|