mirror of
https://github.com/flarum/core.git
synced 2025-07-19 07:41:22 +02:00
Use whereRaw instead of Expression
This commit is contained in:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user