Files
HickmeisterandClaude Sonnet 5.5 ab1fdb961f
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 28s
Add notification inbox, toasts and alert scanner for orders, prints and filament
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-11 21:02:35 +01:00

36 lines
865 B
PHP

<?php
namespace App\Notifications;
use Illuminate\Notifications\Notification;
class DashboardAlert extends Notification
{
/**
* @param 'info'|'success'|'warning'|'danger' $level
*/
public function __construct(
public string $kind,
public string $title,
public string $body,
public string $level = 'info',
public ?string $url = null,
) {}
/**
* @return array<int, string>
*/
public function via(object $notifiable): array
{
return ['database'];
}
/**
* @return array{kind: string, title: string, body: string, level: string, url: string|null}
*/
public function toArray(object $notifiable): array
{
return ['kind' => $this->kind, 'title' => $this->title, 'body' => $this->body, 'level' => $this->level, 'url' => $this->url];
}
}