title: Sum of column in where clause in laravel eloquent
body: <p>I have a FamilyMember model and a SubscriptionCharge model, SubscriptionCharge store charges of multiple months of each family member.
  I have to select members whos sum of charges greater than a specific amount.</p>
  
  <pre><code>$members=FamilyMember::whereHas('subscription_charge', function ($qq) {
     $qq-&gt;where(); // how to check sum of column 'amount' in where
  })-&gt;get();
  </code></pre>
  
  <p>How to check the sum of column 'amount' in a where condition</p>