title: Dynamic model filter in Laravel's Eloquent
body: <p>I'm looking for a way to make a dynamic &amp; global model filter in Laravel.
  I'm imagining a function like the following in my User.php model:</p>
  
  <pre><code>public function filter() {
      return ($someVariable === true);
  }
  </code></pre>
  
  <p>Whenever I do a query using Eloquent's query builder, I only want users to show up in the collection when the filter above returns true. I would have thought a feature like that existed, but a quick look at the documentation suggests otherwise. Or did I miss it?</p>