src/Discussion/DiscussionRepository.php
public function getReadIds(User $user)
    {
        return Discussion::leftJoin('discussion_user', 'discussion_user.discussion_id', '=', 'discussions.id')
            ->where('discussion_user.user_id', $user->id)
            ->whereColumn('last_read_post_number', '>=', 'last_post_number')
            ->pluck('id')
            ->all();
    }
public function getReadIds(User $user)
    {
        return Discussion::leftJoin('discussion_user', 'discussion_user.discussion_id', '=', 'discussions.id')
            ->where('discussion_user.user_id', $user->id)
            ->whereColumn('last_read_post_number', '>=', 'last_post_number')
            ->pluck('id')
            ->all();
    }
public function getReadIds ( User $ user ) { return Discussion :: leftJoin ( 'discussion_user' , 'discussion_user.discussion_id' , '=' , 'discussions.id' ) -> where ( 'discussion_user.user_id' , $ user -> id ) -> whereColumn ( 'last_read_post_number' , '>=' , 'last_post_number' ) -> pluck ( 'id' ) -> all ( ) ; }
Get the IDs of discussions which a user has read completely.

@param User $user
@return array
Get the IDs of discussions which a user has read completely .