fix: 🐛 remove cache for the getFirstHighlighted method in Recipe model

This commit is contained in:
Nicolas Demangeat 2024-10-09 09:50:16 +02:00
parent dd5aea8de3
commit 245a863319

View file

@ -213,9 +213,7 @@ class Recipe extends Model implements SeoInterface
*/
public static function getFirstHighlighted(): \App\Models\Recipe|null
{
return Cache::rememberForever('publishedFirstHighlightedRecipe', function () {
return self::query()->where('published', true)->where('highlight', true)->first();
});
return self::query()->where('published', true)->where('highlight', true)->first();
}
/**