title: Laravel 4.2 - can't get random rows from database
body: <p>Can someone explain to me why this works</p>
  
  <pre><code>$profile = Profile::all()-&gt;random(8);
  </code></pre>
  
  <p>and this doesn't work</p>
  
  <pre><code>$profile = Profile::where('gender_id', '=', 1)-&gt;random(8);
  </code></pre>
  
  <p>I get the error saying</p>
  
  <blockquote>
    <p>Call to undefined method Illuminate\Database\Query\Builder::random()</p>
  </blockquote>