title: Laravel Eloquent Relations: ->latest()
body: <p>What is the function of latest() in laravel?</p>
  
  <p>Example:</p>
  
  <pre><code>public function activity()
  {
      return $this-&gt;hasMany('App\Activity')
          -&gt;with(['user', 'subject'])
          -&gt;latest();
  }
  </code></pre>
  
  <p>From <a href="https://github.com/laracasts/Build-An-Activity-Feed-in-Laravel/blob/master/app/User.php" rel="noreferrer">Build an activity feed in Laravel</a> on line 44.</p>
  
  <p>I've been looking in the laravel documentation, but I couldn't find it...</p>