Skip to content

Commit 20b8476

Browse files
authored
fix(cache): serialize notice as array to prevent __PHP_Incomplete_Class on cache hits (#438)
1 parent 5870968 commit 20b8476

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎app/Models/Notice.php‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public static function singleton(): self
3636
]);
3737
}
3838

39-
public static function activeForDisplay(): ?self
39+
public static function activeForDisplay(): ?array
4040
{
4141
return Cache::rememberForever('active_notice_for_display', function () {
42-
return static::where('is_active', true)->first();
42+
return static::where('is_active', true)->first()?->toArray();
4343
});
4444
}
4545
}

0 commit comments

Comments
 (0)