Öffne Katalog, Bibliothek und Testkauf für den MVP.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
463851d402
commit
fd6860efda
51 files changed
+2331
-31
No files matched your search
@@ -0,0 +1,19 @@
|
||||
<?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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user