public function userConversations($user)
    {
        $userId = is_object($user) ? $user->getKey() : $user;

        return $this->join('mc_conversation_user', 'mc_conversation_user.conversation_id', '=', 'mc_conversations.id')
            ->where('mc_conversation_user.user_id', $userId)
            ->where('private', true)
            ->pluck('mc_conversations.id');
    }
public function userConversations($user)
    {
        $userId = is_object($user) ? $user->getKey() : $user;

        return $this->join('mc_conversation_user', 'mc_conversation_user.conversation_id', '=', 'mc_conversations.id')
            ->where('mc_conversation_user.user_id', $userId)
            ->where('private', true)
            ->pluck('mc_conversations.id');
    }
public function userConversations ( $ user ) { $ userId = is_object ( $ user ) ? $ user -> getKey ( ) : $ user ; return $ this -> join ( 'mc_conversation_user' , 'mc_conversation_user.conversation_id' , '=' , 'mc_conversations.id' ) -> where ( 'mc_conversation_user.user_id' , $ userId ) -> where ( 'private' , true ) -> pluck ( 'mc_conversations.id' ) ; }
Gets conversations for a specific user.

@param User | int $user

@return array
Gets conversations for a specific user .