mirror of
https://github.com/flarum/framework.git
synced 2025-01-20 02:52:44 +08:00
Use whereRaw instead of Expression
This commit is contained in:
parent
1c87c33d4d
commit
0befe041c7
|
@ -13,7 +13,6 @@ namespace Flarum\Discussion;
|
|||
|
||||
use Flarum\User\User;
|
||||
use Illuminate\Database\Eloquent\Builder;
|
||||
use Illuminate\Database\Query\Expression;
|
||||
|
||||
class DiscussionRepository
|
||||
{
|
||||
|
@ -52,7 +51,7 @@ class DiscussionRepository
|
|||
{
|
||||
return Discussion::leftJoin('users_discussions', 'users_discussions.discussion_id', '=', 'discussions.id')
|
||||
->where('user_id', $user->id)
|
||||
->where('read_number', '>=', new Expression('last_post_number'))
|
||||
->whereRaw('read_number >= last_post_number')
|
||||
->pluck('id')
|
||||
->all();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user