{"action":"created","issue":{"url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/15","labels_url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/15/labels{/name}","comments_url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/15/comments","events_url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/15/events","html_url":"https://github.com/cmgmyr/laravel-messenger/issues/15","id":57353818,"number":15,"title":"How to keep the messages between two users in a single thread?","user":{"login":"Ramir1","id":971933,"avatar_url":"https://avatars.githubusercontent.com/u/971933?v=3","gravatar_id":"","url":"https://api.github.com/users/Ramir1","html_url":"https://github.com/Ramir1","followers_url":"https://api.github.com/users/Ramir1/followers","following_url":"https://api.github.com/users/Ramir1/following{/other_user}","gists_url":"https://api.github.com/users/Ramir1/gists{/gist_id}","starred_url":"https://api.github.com/users/Ramir1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Ramir1/subscriptions","organizations_url":"https://api.github.com/users/Ramir1/orgs","repos_url":"https://api.github.com/users/Ramir1/repos","events_url":"https://api.github.com/users/Ramir1/events{/privacy}","received_events_url":"https://api.github.com/users/Ramir1/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cmgmyr/laravel-messenger/labels/question","name":"question","color":"cc317c"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-02-11T18:10:07Z","updated_at":"2015-03-03T18:51:12Z","closed_at":"2015-02-12T13:38:50Z","body":"How to keep the messages between two users in a single thread?\r\nIs it possible?"},"comment":{"url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/comments/77008778","html_url":"https://github.com/cmgmyr/laravel-messenger/issues/15#issuecomment-77008778","issue_url":"https://api.github.com/repos/cmgmyr/laravel-messenger/issues/15","id":77008778,"user":{"login":"cmgmyr","id":4693481,"avatar_url":"https://avatars.githubusercontent.com/u/4693481?v=3","gravatar_id":"","url":"https://api.github.com/users/cmgmyr","html_url":"https://github.com/cmgmyr","followers_url":"https://api.github.com/users/cmgmyr/followers","following_url":"https://api.github.com/users/cmgmyr/following{/other_user}","gists_url":"https://api.github.com/users/cmgmyr/gists{/gist_id}","starred_url":"https://api.github.com/users/cmgmyr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmgmyr/subscriptions","organizations_url":"https://api.github.com/users/cmgmyr/orgs","repos_url":"https://api.github.com/users/cmgmyr/repos","events_url":"https://api.github.com/users/cmgmyr/events{/privacy}","received_events_url":"https://api.github.com/users/cmgmyr/received_events","type":"User","site_admin":false},"created_at":"2015-03-03T18:51:12Z","updated_at":"2015-03-03T18:51:12Z","body":"This is one way you can do it\r\n\r\n    public function store($toUser) {\r\n\t// get input\r\n\r\n\t// save thread\r\n\r\n\t// save message\r\n\r\n\t// sender (same as example)\r\n\tParticipant::create(\r\n\t    [\r\n\t        'thread_id' => $thread->id,\r\n\t        'user_id'   => Auth::user()->id,\r\n\t        'last_read' => new Carbon\r\n\t    ]\r\n\t);\r\n\r\n\t// recipients (new)\r\n\t$thread->addParticipants([$toUser]);\r\n\r\n\t// redirect\r\n    }\r\n\r\nSo you are saving the sender the same as the example, and only adding one other user as a recipient. In your UI you just don't give an option to add more participants to a thread. Make sense?"}}