title: Laravel DB::select not return value as expected
body: <p>I'm having problem to view data using db::select.</p>
  <p>Here is my full sql statement [Tested and return value as expected on mysql]</p>
  <pre><code>SELECT tugasan_kontrak.*,sejarah.tkh_wujud AS tkh_wujud ,sejarah.id_tindakan AS id_tindakan 
  FROM tugasan_kontrak 
  LEFT JOIN sejarah ON(
  tugasan_kontrak.id_tugasan = sejarah.id_tugasan AND 
  jenis_tugasan='k' AND 
  sejarah.id_tindakan !='99' AND
  id_sejarah = (SELECT MAX(id_sejarah) FROM sejarah WHERE 
      tugasan_kontrak.id_tugasan = sejarah.id_tugasan AND jenis_tugasan='k') 
  )
  WHERE pegawai_tugas='890911105098' AND id_tindakan IS NOT NULL
  </code></pre>
  <p><a href="https://i.stack.imgur.com/T1Nmk.png" rel="nofollow noreferrer">Result</a></p>
  <p>But when I try to apply this statement using <code>db::select</code>, no record were view.</p>
  <p>Here the function I use to test</p>
  <pre><code>public function getPenggunaTindakan($value='890911105098')
  {
      $kontrak = DB::select(&quot;select tugasan_kontrak.*,sejarah.tkh_wujud as tkh_wujud ,sejarah.id_tindakan as id_tindakan 
              from tugasan_kontrak left join sejarah on(tugasan_kontrak.id_tugasan = sejarah.id_tugasan and jenis_tugasan='k' and sejarah.id_tindakan !='99' and
                  id_sejarah = (select max(id_sejarah) from sejarah where tugasan_kontrak.id_tugasan = sejarah.id_tugasan and jenis_tugasan='k'))
          where pegawai_tugas=:nokp and id_tindakan is not null &quot;,['nokp' =&gt; $value]);
  
      dd($kontrak);
  }
  </code></pre>
  <p>What did I do wrong?</p>