Skip to content

Commit cc750d6

Browse files
authored
require recipient email address (alexjustesen#289)
1 parent 85810af commit cc750d6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/Filament/Pages/Settings/NotificationPage.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ protected function getFormSchema(): array
100100
->label('Recipients')
101101
->schema([
102102
TextInput::make('email_address')
103-
->email(),
103+
->email()
104+
->required(),
104105
])
105106
->hidden(fn (Closure $get) => $get('mail_enabled') !== true)
106107
->columnSpan(['md' => 2]),
@@ -151,7 +152,7 @@ public function sendTestMailNotification()
151152
{
152153
$notificationSettings = new (NotificationSettings::class);
153154

154-
if (count($notificationSettings->mail_recipients)) {
155+
if (! empty($notificationSettings->mail_recipients)) {
155156
foreach ($notificationSettings->mail_recipients as $recipient) {
156157
Mail::to($recipient)
157158
->send(new Test());

0 commit comments

Comments
 (0)