title: Laravel Illegal operator and value combination Exception on with() with belongsTo() relation
body: <p>I have a Call Model with a belongsTo() relation as following</p>
  
  <pre><code>class Call extends Model
  {
      public function campaign()
      {
          $callStart = $this-&gt;call_start;
          return $this-&gt;belongsTo('App\Campaign','gsm_number','gsm_number')
          -&gt;where(function($query) use($callStart){
              $query-&gt;where('end_date','=','0000-00-00 00:00:00')
                  -&gt;orWhere('end_date','&gt;=',$callStart);
          })-&gt;where(function($query) use($callStart){
              $query-&gt;where('start_date','=','0000-00-00 00:00:00')
                  -&gt;orWhere('start_date','&lt;=',$callStart);
          });
  
      }
  }
  </code></pre>
  
  <p>The logic of this relation is that, each call belongs to a campaign if gsm_numbers in both tables match and call_start from start_date in Campaign is either not set or less than call_start in Call model and end_date in Campaign model is wither not set or it is greater than call_start from Call Model</p>
  
  <p>In Controller I do:</p>
  
  <pre><code>$calls = Call::orderBy('call_start','DESC')-&gt;get(); //in simplest form
  return view('calls')-&gt;with('calls',$calls);
  </code></pre>
  
  <p>In View for campaigns listing I display campaign information as well using following</p>
  
  <pre><code>@foreach($calls as $call)
        {{ $call-&gt;campaign['name'] }}
  @endforeach
  </code></pre>
  
  <p>No issue but I need to perform same issue with ajax calls as well so I need calls data along with campaigns. So I do the following</p>
  
  <pre><code>$calls = Call::with('campaign')-&gt;orderBy('call_start','DESC')
              -&gt;get();
  
  if($request-&gt;ajax()){
    return $calls
  }
  </code></pre>
  
  <p>In this case I get exception <code>InvalidArgumentException in Builder.php line 464:
  Illegal operator and value combination.</code></p>
  
  <p>Exception Stack:</p>
  
  <pre><code>in Builder.php line 464
  at Builder-&gt;where('end_date', '&gt;=', null, 'or')
  at call_user_func_array(array(object(Builder), 'where'), array('end_date', '&gt;=', null, 'or')) in Builder.php line 640
  at Builder-&gt;where('end_date', '&gt;=', null, 'or') in Builder.php line 656
  at Builder-&gt;orWhere('end_date', '&gt;=', null) in Call.php line 51
  at Call-&gt;App\{closure}(object(Builder))
  </code></pre>