title: How to display data like this in laravel
body: <p>This query it's worked for now.</p>
  
  <pre><code>$konfHistory = DB::table('t_history_cuti as hc')
          -&gt;leftjoin('m_detail_organisasi as do', 'do.nik_staff', '=', 'hc.nik')
          -&gt;join('m_karyawan as kary', 'kary.nik', '=', 'hc.nik')
          -&gt;join('m_rumah_sakit as rs', 'rs.kd_rs', '=', 'kary.kd_rs')
          -&gt;join('m_jabatan as jab', 'jab.kd_jabatan', '=', 'kary.kd_jabatan')
          -&gt;join('m_unit as unit', 'unit.kd_unit', '=', 'kary.kd_unit')
          -&gt;where('hc.kd_rs', $kdRS)
          -&gt;where('do.koreksi', false)
          -&gt;where('do.nik_penanggung_jawab', $nik)
          -&gt;select('hc.*', 'kary.nik', 'kary.nm_karyawan', 'jab.nm_jabatan', 'rs.nm_rs', 'unit.nm_unit')
          -&gt;get();
  </code></pre>
  
  <p>But i wanna show all data from t_history_cuti where status = '2' too, without duplicate data from above query.</p>
  
  <p>This is a display of the data above:
  <a href="https://i.stack.imgur.com/8e0qT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8e0qT.png" alt="display data for now"></a></p>
  
  <p>And this is the data expectation that I want:
  <a href="https://i.stack.imgur.com/SDYaS.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/SDYaS.png" alt="my expectation"></a></p>
  
  <p>Thanks a lot.</p>