title: two columns where clause merge with comma
body: <p>I want to build a query.</p>
  
  <blockquote>
    <p>here is table:</p>
  </blockquote>
  
  <pre><code>id  user_id  sn_no
  1   22       00112233
  2   22       987654325
  3   22       65489732
  4   25       984123123
  5   25       9568456456
  6   25       65456456
  </code></pre>
  
  <p>I want result like this:</p>
  
  <pre><code>{
     "user_id":22,
     "sn_no": "00112233,987654325,65489732"
  }
  {
     "user_id":25,
     "sn_no": "984123123,9568456456,65456456"
  }
  </code></pre>
  
  <p>Can anyone please help to solve this issue?</p>
  
  <p>I have tried: <code>concat</code>, <code>GROUP_CONCAT</code> but can not get the result.</p>
  
  <p>Can you please help me add this in Join query?</p>
  
  <pre><code>$users = \DB::table('users')
              -&gt;join('users_mcu', 'users.id', '=', 'users_mcu.user_id')
              -&gt;join('country_user', 'users.id', '=', 'country_user.user_id')
              -&gt;join('country_phase_color', 'country_user.country_id', '=', 'country_phase_color.id')
              -&gt;select('users.id', 'users.first_name', 'users.last_name', 'users.company', 'users.designation', 'users.lang', 'users.phone', 'users.disp_graph', 'users.user_image', 'users.email', 'users.role', 'users.created_at', 'users.updated_at', 'country_user.country_id', 'country_phase_color.country_name')
              -&gt;get();
  </code></pre>