From 382dc4aa03f89875d23da0e0ca4a6fc77e9c5f20 Mon Sep 17 00:00:00 2001 From: Yoga Pangestu Date: Mon, 4 May 2026 08:52:53 +0700 Subject: [PATCH] feat: set default value for published_at field in NewsForm schema --- app/Filament/Resources/Publication/News/Schemas/NewsForm.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/Publication/News/Schemas/NewsForm.php b/app/Filament/Resources/Publication/News/Schemas/NewsForm.php index f2425f7..4d438b0 100644 --- a/app/Filament/Resources/Publication/News/Schemas/NewsForm.php +++ b/app/Filament/Resources/Publication/News/Schemas/NewsForm.php @@ -25,7 +25,8 @@ public static function configure(Schema $schema): Schema Hidden::make('author_id') ->default(auth()->id()), - Hidden::make('published_at'), + Hidden::make('published_at') + ->default(now()), Section::make(CheerfulNotification::getByKey('news.content.title')) ->description(CheerfulNotification::getByKey('news.content.desc'))