mirror of
https://github.com/flarum/framework.git
synced 2025-02-21 07:11:56 +08:00
Fix column names
This commit is contained in:
parent
5443dc7ce2
commit
cd31f11b64
@ -380,7 +380,7 @@ class Discussion extends AbstractModel
|
||||
*/
|
||||
public function lastUser()
|
||||
{
|
||||
return $this->belongsTo(User::class, 'last_user_id');
|
||||
return $this->belongsTo(User::class, 'last_posted_user_id');
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -34,7 +34,7 @@ class NotificationRepository
|
||||
->whereIn('type', $user->getAlertableNotificationTypes())
|
||||
->whereNull('deleted_at')
|
||||
->groupBy('type', 'subject_id')
|
||||
->orderByRaw('MAX(time) DESC')
|
||||
->orderByRaw('MAX(created_at) DESC')
|
||||
->skip($offset)
|
||||
->take($limit);
|
||||
|
||||
|
@ -136,8 +136,8 @@ class PostRepository
|
||||
$query = Discussion::find($discussionId)
|
||||
->posts()
|
||||
->whereVisibleTo($actor)
|
||||
->where('time', '<', function ($query) use ($discussionId, $number) {
|
||||
$query->select('time')
|
||||
->where('created_at', '<', function ($query) use ($discussionId, $number) {
|
||||
$query->select('created_at')
|
||||
->from('posts')
|
||||
->where('discussion_id', $discussionId)
|
||||
->whereNotNull('number')
|
||||
|
Loading…
x
Reference in New Issue
Block a user