title: Method whereDate does not exist
body: <ul>
  <li>Laravel Version: 5.3.28 </li>
  <li>PHP Version: 7.0.10</li>
  <li>Database Driver &amp; Version: MySQL 5.7.14</li>
  </ul>
  
  <p>I got an error ,When i try to use whereDate in my view page.</p>
  
  <blockquote>
    <p>1/2 BadMethodCallException in Macroable.php line 74: Method whereDate
    does not exist. </p>
    
    <p>2/2 ErrorException in Macroable.php line 74: Method whereDate does not
    exist. (View:
    C:\wamp\www\2_Work\dashboard\resources\views\pdf\user.blade.php)</p>
  </blockquote>
  
  <p>My model relationship is work, But why i can't use whereDate function.</p>
  
  <pre><code>@extends('layouts.pdf')
  
  @section('content')
    &lt;table border="1" cellspacing="0" cellpadding="0" width="545"&gt;
      &lt;tr&gt;
        &lt;th&gt;ชื่อผู้ใช้งาน&lt;/th&gt;
        &lt;th&gt;เข้าใช้ล่าสุด&lt;/th&gt;
        &lt;th&gt;จำนวนการเข้าใช้งานใน 7 วัน&lt;/th&gt;
        &lt;th&gt;จำนวนงานที่ทำในวันที่ 13/01/2560&lt;/th&gt;
      &lt;/tr&gt;
      @foreach ($users as $user)
        &lt;tr&gt;
          &lt;td&gt;&lt;span class="td-text"&gt;{{$user-&gt;user_detail}}&lt;/span&gt;&lt;/td&gt;
          &lt;td align="center"&gt;{{$user-&gt;ual-&gt;first()-&gt;created_at ?? NULL}}&lt;/td&gt;
          &lt;td align="center"&gt;{{$user-&gt;ual-&gt;where('created_at', '&gt;=', '(CURDATE() - INTERVAL 7 DAY)')-&gt;count()}}&lt;/td&gt;
          &lt;td align="left"&gt;&lt;?php var_dump( $user-&gt;dataDetail-&gt;whereDate('created_at', '2017-01-13')-&gt;toArray() ); ?&gt;&lt;/td&gt;
        &lt;/tr&gt;
      @endforeach
    &lt;/table&gt;
  @endsection
  </code></pre>
  
  <p>Controller</p>
  
  <pre><code>$data['users'] = UserModel::all();
  return view('pdf.user', $data);
  </code></pre>
  
  <p>UserModel</p>
  
  <pre><code>class UserModel extends Model
  {
    public function dataDetail()
    {
      return $this-&gt;hasMany('App\DataDetailModel', 'user_id', 'user_id');
    }
  }
  </code></pre>