feat: Add custom cheerful saved notifications to general, SEO, and social media settings pages.

This commit is contained in:
Yoga Pangestu 2026-01-29 21:12:04 +07:00
parent 3f2537af7d
commit 705dfe6537
3 changed files with 21 additions and 0 deletions

View File

@ -2,6 +2,7 @@
namespace App\Filament\Pages\Settings;
use App\Filament\Support\CheerfulNotification;
use App\Settings\GeneralSettings;
use BackedEnum;
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
@ -9,6 +10,7 @@
use Filament\Forms\Components\RichEditor;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Notifications\Notification;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
@ -98,4 +100,9 @@ public function form(Schema $schema): Schema
])
->columns(3);
}
public function getSavedNotification(): ?Notification
{
return CheerfulNotification::update()->send();
}
}

View File

@ -2,11 +2,13 @@
namespace App\Filament\Pages\Settings;
use App\Filament\Support\CheerfulNotification;
use App\Settings\SeoSettings;
use BackedEnum;
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
use Filament\Forms\Components\Textarea;
use Filament\Forms\Components\TextInput;
use Filament\Notifications\Notification;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Components\Section;
use Filament\Schemas\Schema;
@ -58,4 +60,9 @@ public function form(Schema $schema): Schema
->columnSpanFull(),
]);
}
public function getSavedNotification(): ?Notification
{
return CheerfulNotification::update()->send();
}
}

View File

@ -2,10 +2,12 @@
namespace App\Filament\Pages\Settings;
use App\Filament\Support\CheerfulNotification;
use App\Settings\SocialMediaSettings;
use BackedEnum;
use BezhanSalleh\FilamentShield\Traits\HasPageShield;
use Filament\Forms\Components\TextInput;
use Filament\Notifications\Notification;
use Filament\Pages\SettingsPage;
use Filament\Schemas\Components\Grid;
use Filament\Schemas\Components\Section;
@ -67,4 +69,9 @@ public function form(Schema $schema): Schema
->columnSpanFull(),
]);
}
public function getSavedNotification(): ?Notification
{
return CheerfulNotification::update()->send();
}
}