protected function newConversation($receiverId)
    {
        $conversationId = $this->isConversationExists($receiverId);
        $user = $this->getSerializeUser($this->authUserId, $receiverId);

        if ($conversationId === false) {
            $conversation = $this->conversation->create([
                'user_one' => $user['one'],
                'user_two' => $user['two'],
                'status' => 1,
            ]);

            if ($conversation) {
                return $conversation->id;
            }
        }

        return $conversationId;
    }
protected function newConversation($receiverId)
    {
        $conversationId = $this->isConversationExists($receiverId);
        $user = $this->getSerializeUser($this->authUserId, $receiverId);

        if ($conversationId === false) {
            $conversation = $this->conversation->create([
                'user_one' => $user['one'],
                'user_two' => $user['two'],
                'status' => 1,
            ]);

            if ($conversation) {
                return $conversation->id;
            }
        }

        return $conversationId;
    }
protected function newConversation ( $ receiverId ) { $ conversationId = $ this -> isConversationExists ( $ receiverId ) ; $ user = $ this -> getSerializeUser ( $ this -> authUserId , $ receiverId ) ; if ( $ conversationId === false ) { $ conversation = $ this -> conversation -> create ( [ 'user_one' => $ user [ 'one' ] , 'user_two' => $ user [ 'two' ] , 'status' => 1 , ] ) ; if ( $ conversation ) { return $ conversation -> id ; } } return $ conversationId ; }
make new conversation the given receiverId with currently loggedin user.

@param int $receiverId

@return int
make new conversation the given receiverId with currently loggedin user .