When caching published auditions, get auditions with flags in inital query
This commit is contained in:
parent
b005aed129
commit
2cbf00b1d7
|
|
@ -67,7 +67,7 @@ class AuditionCacheService
|
||||||
$cacheKey,
|
$cacheKey,
|
||||||
now()->addHour(),
|
now()->addHour(),
|
||||||
function () {
|
function () {
|
||||||
return Audition::orderBy('score_order')->get()->filter(fn ($audition) => $audition->hasFlag('seats_published'));
|
return Audition::with('flags')->orderBy('score_order')->get()->filter(fn ($audition) => $audition->hasFlag('seats_published'));
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue