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

$conversation = Chat::conversations()->between($participantModel1, $participantModel2); is not work #309

Open
waiyanmyodev opened this issue Jul 30, 2022 · 2 comments

Comments

@waiyanmyodev
Copy link

I try

$user1 = User::find(1);
$user2 = User::find(2);
$conversation = Chat::conversations()->between($user1, $user2);
return $conversation;

in my controller

@imCaps
Copy link

imCaps commented Sep 19, 2022

I try

$user1 = User::find(1); $user2 = User::find(2); $conversation = Chat::conversations()->between($user1, $user2); return $conversation;

in my controller

Could you provide more information?
Does the system throws an exception?
Have you created a conversation before? It returns null If no conversations between participants.

I have just tested on my side and it returns Musonza\Chat\Models\Conversation as I expected
Laravel 9.19, musonza/chat 6

@mohamedfadol
Copy link

make sure you get conversations that are direct, and make sure direct_message column is 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

3 participants