1
0
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:
Toby Zerner
2018-07-21 17:21:08 +09:30
parent 7d0813bce4
commit ff7f7681c7
3 changed files with 4 additions and 4 deletions

View File

@ -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();
}