This commit is contained in:
salam committed 2026-02-08 08:36:10 +01:00
1 parent 95315d1453
commit a159fe4cd5
2 files changed
+15 -5

No files matched your search

+4 -5
View File
@@ -6,8 +6,8 @@ use App\Mail\UserNotification;
use App\Models\User;
use Filament\Actions\Concerns\InteractsWithActions;
use Filament\Actions\Contracts\HasActions;
use Filament\Forms\Components\MarkdownEditor;
use Filament\Forms\Components\Select;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Forms\Components\Toggle;
use Filament\Notifications\Notification;
@@ -44,8 +44,7 @@ class UserNotifications extends Component implements HasActions, HasSchemas, Has
Toggle::make('notify_by_email')->label('Send also as E-Mail'),
TextInput::make('subject')
->required(),
MarkdownEditor::make('message')
->required(),
Textarea::make('message')->rows(4),
])
->statePath('data');
}
@@ -62,8 +61,8 @@ class UserNotifications extends Component implements HasActions, HasSchemas, Has
}
Notification::make()
->title($data['subject'])
->icon('phosphor-envelope-duotone')
->body($data['message'])
->icon('phosphor-user-duotone')
->body('from: '.auth()->user()->name.'<br>'.$data['message'])
->sendToDatabase($recipient);
Notification::make()