title: Laravel different use of where clause
body: <p>I want to ask about some feature in Laravel, I'm working with some old code written by someone else and I want to understand why it is written this way:</p>
  
  <pre><code>$users = Users::all();
  $results = $users-&gt;where('age', '&gt;','30')-&gt;get();
  </code></pre>
  
  <p>My question is how can 'where' clause be used with the '$users' variable? This works fine and no error is given and it returns the required results. But as far as i know, 'where' clause can be used like:</p>
  
  <pre><code>Classname::where()-&gt;get()
  </code></pre>
  
  <p>Does the User model implements some feature or use something to be able to call 'where' clause this way? When i try to do the same but with a new model i'm creating I get </p>
  
  <pre><code>"Type error: Too few arguments to function Illuminate\\Support\\Collection::get()
  </code></pre>