title: How to solve Method orderBy does not exist on laravel?
body: <p>I use this package : <a href="https://github.com/andersao/l5-repository" rel="nofollow noreferrer">https://github.com/andersao/l5-repository</a></p>
  
  <p>My user repository is like this :</p>
  
  <pre><code>public function getList($year)
  {
      $query = parent::findWhere(['year' =&gt; $year])
                   -&gt;orderBy('updated_at')
                   -&gt;paginate(10);
      return $query;
  }
  </code></pre>
  
  <p>When executed, there exist error like this :</p>
  
  <blockquote>
    <p>Method orderBy does not exist.</p>
  </blockquote>
  
  <p>Whereas I see in the documentation, there exist <code>orderBy</code> </p>
  
  <p>How can I solve it?</p>