intervle - commit 1497f2a
fix: actually order chronologically1497f2a8a90499b1bd413a35e13952ace4a97d48LukeJ<luke.jones.2567@gmail.com>2026-03-08T13:17:00Zdiff --git a/app/Models/Event.php b/app/Models/Event.php
index 4c166cb..f9151cd 100644
--- a/app/Models/Event.php
+++ b/app/Models/Event.php
@@ -25,9 +25,12 @@ class Event extends Model
public function scopeDailyRandomOrdered($query, $seed)
{
- return $query
+ $sub = self::query()
->orderByRaw("md5(id::text || ?)", [$seed])
- ->limit(5)
- ->orderBy('date', 'desc');
+ ->limit(5);
+
+ return $query
+ ->fromSub($sub, 'daily_events')
+ ->orderBy('date', 'asc');
}
}