chat
chat copied to clipboard
$conversation = Chat::conversations()->between($participantModel1, $participantModel2); is not work
I try
$user1 = User::find(1); $user2 = User::find(2); $conversation = Chat::conversations()->between($user1, $user2); return $conversation;
in my controller
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
make sure you get conversations that are direct, and make sure direct_message column is 1.