Add notification inbox, toasts and alert scanner for orders, prints and filament
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 28s
Deploy HickLab3D Dashboard / Deploy to production (push) Successful in 28s
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5.5
parent
04be9802dc
commit
ab1fdb961f
@@ -0,0 +1,35 @@
|
||||
<?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];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user