mirror of
https://github.com/flarum/core.git
synced 2025-07-16 14:26:25 +02:00
Use Eloquent's latest
and oldest
This commit is contained in:
@ -41,7 +41,7 @@ class NotificationRepository
|
||||
return Notification::select('notifications.*', app('flarum.db')->raw('p.unread_count'))
|
||||
->mergeBindings($primaries->getQuery())
|
||||
->join(app('flarum.db')->raw('('.$primaries->toSql().') p'), 'notifications.id', '=', app('flarum.db')->raw('p.id'))
|
||||
->latest('created_at')
|
||||
->latest()
|
||||
->get();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user