Skip to content

Commit

Permalink
Merge pull request #11389 from nanaya/daily-challenge-query-order
Browse files Browse the repository at this point in the history
Better daily challenge query order
  • Loading branch information
notbakaneko authored Aug 6, 2024
2 parents 5f5ed1a + 83bcb9f commit d5f8d09
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/Models/Multiplayer/Room.php
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,7 @@ public function macroDailyChallengeFor(): \Closure
return fn (Builder $query, CarbonImmutable $date): ?static
=> static::where('category', 'daily_challenge')
->whereBetween('starts_at', [$date->startOfDay(), $date->endOfDay()])
->orderBy('starts_at', 'DESC')
->first();
->last();
}

public function host()
Expand Down

0 comments on commit d5f8d09

Please sign in to comment.