Files
laraundfelix/app/Filament/Support/ReportsDomainRules.php
T
LarsandCursor fd6860efda
Deploy Test / test (push) Successful in 12s
Deploy Test / deploy (push) Successful in 21s
Öffne Katalog, Bibliothek und Testkauf für den MVP.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-11-15 09:04:08 +01:00

20 lines
495 B
PHP

<?php
namespace App\Filament\Support;
use App\Domain\Catalog\DomainRuleException;
use Filament\Notifications\Notification;
trait ReportsDomainRules
{
protected function report(callable $callback, string $success): void
{
try {
$callback();
Notification::make()->title($success)->success()->send();
} catch (DomainRuleException $exception) {
Notification::make()->title($exception->getMessage())->danger()->send();
}
}
}