Add notification inbox, toasts and alert scanner for orders, prints and filament
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:
Hickmeister
2026-10-11 21:02:35 +01:00
co-authored by Claude Sonnet 5.5
parent 04be9802dc
commit ab1fdb961f
17 changed files with 805 additions and 1 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
/**
* Remembers what the alert scanner has already seen so each event notifies once.
*/
class AlertState extends Model
{
public $incrementing = false;
protected $primaryKey = 'key';
protected $keyType = 'string';
protected $fillable = ['key', 'state'];
protected function casts(): array
{
return ['state' => 'array'];
}
/**
* @return array<string, mixed>|null
*/
public static function read(string $key): ?array
{
return static::find($key)?->state;
}
/**
* @param array<string, mixed> $state
*/
public static function write(string $key, array $state): void
{
static::updateOrCreate(['key' => $key], ['state' => $state]);
}
}