Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The conversation's method 'between' is not giving the correct count #316

Open
FSElias opened this issue Feb 2, 2023 · 0 comments
Open

Comments

@FSElias
Copy link

FSElias commented Feb 2, 2023

The following code is not giving the correct result

<?php
        // there are 2 ChatBot models in the database
        $conversation = Chat::createConversation([User::find(1), ChatBot::find(1)])->makeDirect();
        $conversation = Chat::createConversation([User::find(1), ChatBot::find(2)])->makeDirect();
        $conversations = Chat::conversations()->between(User::find(1), ChatBot::find(1));
        dd($conversations->count());

Please why I am getting 2 instead of 1?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant