diff --git a/app/Models/Notice.php b/app/Models/Notice.php index 18c718f8..f77f07b9 100644 --- a/app/Models/Notice.php +++ b/app/Models/Notice.php @@ -36,10 +36,10 @@ public static function singleton(): self ]); } - public static function activeForDisplay(): ?self + public static function activeForDisplay(): ?array { return Cache::rememberForever('active_notice_for_display', function () { - return static::where('is_active', true)->first(); + return static::where('is_active', true)->first()?->toArray(); }); } }