title: Laravel Nova metrics filtering
body: <p>I have a model called Property which has an 'active' flag. I want a metric at the top of my resource which shows a count of active Properties. </p>
  
  <p>My calculate method is exactly as in the doc but this shows all Properties rather than active ones:</p>
  
  <pre><code>public function calculate(Request $request)
  {
      return $this-&gt;count($request, Property::class);
  }
  </code></pre>
  
  <p>How can I add a filter? </p>
  
  <p>I've tried a where clause:</p>
  
  <pre><code>public function calculate(Request $request)
  {
      return $this-&gt;count($request, Property::class)-&gt;where('active','=',1);
  }
  </code></pre>
  
  <p>And a query scope:</p>
  
  <pre><code>public function calculate(Request $request)
  {
      return $this-&gt;count($request, Property::class)-&gt;active();
  }
  </code></pre>
  
  <p>I thought I might be able to use the Nova filter I set up on the resource list page but that didn't seem to work either. I'm sure it's really easy but I haven't worked it out. Thanks for your help!</p>