title: Laravel 5.3 Return ? on Where Eloquent
body: <p>I've sucessfully created many functions using <code>where</code> query on Laravel 5.3, but this time something weird is happening.</p>
  
  <p></p>
  
  <pre><code>public function show($id){
      $artikel = Artikel::select('artikel.*','kategori.kategori_id','kategori.kategori_nama','users.name','users.user_photo','users.biodata')
              -&gt;join('kategori','artikel.kategori_id','=','kategori.kategori_id')
              -&gt;join('users','user_id','=','id')
              -&gt;orderBy('view','desc')
              -&gt;find($id);
      $kategori = Kategori::all();
      $sub = Artikel::select('kategori_id')-&gt;where('artikel_id',$id)-&gt;toSql();
      dd($sub);
      $related = Artikel::where('kategori_id','=',$sub)
                  -&gt;get();
      dd($related);
      if($artikel == null ){
          $artikel = new Artikel; 
          $artikel-&gt;pesan=0;
  
          foreach ($artikel as $post) {
              $this-&gt;putInCache( $post-&gt;slug, $post, 'artikel' );
          }
          return view('artikel.show')-&gt;with('artikel',$artikel)-&gt;with('kategori',$kategori);
      }
  
      $artikel-&gt;view+=1;
      $artikel-&gt;save();
  
      return view('artikel.show')-&gt;with('artikel',$artikel)-&gt;with('kategori',$kategori)-&gt;with('related',$related);
  }
  </code></pre>
  
  <p>The method outputs an error on line 8. The <code>dd()</code> on line 9 returned </p>
  
  <pre><code>"select `kategori_id` from `artikel` where `artikel_id` = ?"
  </code></pre>
  
  <p>I've tried to change the query to </p>
  
  <pre><code>$sub = Artikel::select('kategori_id')-&gt;where('artikel_id','=',1)-&gt;toSql();
  </code></pre>
  
  <p>And much more, but still got an error. That line returned <code>?</code> on where clause. Please help me.</p>
  
  <p>Thank you!</p>
  
  <p><strong>UPADTE 1</strong></p>
  
  <p>Now the code is like this : </p>
  
  <pre><code>$related = Artikel::where('kategori_id','=','select kategori_id from artikel where artikel_id = 1')
                  -&gt;get();
  </code></pre>
  
  <p>and the result is returned empty collection.</p>
  
  <blockquote>
    <p>Collection {#272 ▼
      #items: []
    }</p>
  </blockquote>