title: Laravel query returns builder instead of collection
body: <p>I am new to laravel and trying to have a result. 
  My code is this:</p>
  
  <pre><code>class GegonosController extends Controller
  {
      public function index($gid = null, $cid = null, $nid = null)
      {
          if (is_null($cid) and is_null($nid) and is_null($gid)) {
              $gegon = Gegono::orderBy('created_at','desc')-&gt;get(); 
          }
          else{
              if(!is_null($gid)) {
                  if($gid == 0) {
                      $gegon = Gegono::where('gegtype_id','&gt;',1);
                  }
                  else{
                      $gegon = Gegono::where('gegtype_id', '=', $gid);   
                  }
              }
              else {
                  $gegon = Gegono::where('gegtype_id','&gt;',0);
              }
              if (!is_null($cid)) {
                  $gegon-&gt;where('city_id', '=',$cid);
              }
              if (!is_null($nid)) {
                  $gegon-&gt;where('nomos_id','=', $nid);
              }        
              $gegon-&gt;orderBy('created_at','desc')-&gt;get(); 
          }                        
          $nomoi = \App\Nomoi::orderby('name')-&gt;get();
          return view('front.gegonota', compact('gegon','gid','cid','nid','nomoi'));
      }
  </code></pre>
  
  <p>In the first, if when all variables are null the result is a collection of all the records of the table.
  In all other, if (other cases) the result is a builder and I get no results,</p>
  
  <p>It doesn't show any error but gives no results.</p>
  
  <p>Any help would save me a lot of time.</p>