public function getFirstNewNotSeen()
    {
        return $this
                ->hasOne(Post::className(), ['thread_id' => 'id'])
                ->where(['>', 'created_at', $this->userView ? $this->userView->new_last_seen : 0])
                ->orderBy(['id' => SORT_ASC]);
    }
public function getFirstNewNotSeen()
    {
        return $this
                ->hasOne(Post::className(), ['thread_id' => 'id'])
                ->where(['>', 'created_at', $this->userView ? $this->userView->new_last_seen : 0])
                ->orderBy(['id' => SORT_ASC]);
    }
public function getFirstNewNotSeen ( ) { return $ this -> hasOne ( Post :: className ( ) , [ 'thread_id' => 'id' ] ) -> where ( [ '>' , 'created_at' , $ this -> userView ? $ this -> userView -> new_last_seen : 0 ] ) -> orderBy ( [ 'id' => SORT_ASC ] ) ; }
First new not seen post relation.
@return Post
First new not seen post relation .