title: Laravel global function
body: <p>I have 2 models:</p>
  
  <p><strong>Bill:</strong>
  id, account_id,  descripcion, monto_pagado, saldo</p>
  
  <p><strong>Payment:</strong>
  id, bill_id, monto</p>
  
  <p>Each time someone insert a new bill to the account or insert a new payment I pretend to calculate the balance of the account.</p>
  
  <p>What would be the best place to accomplish this:</p>
  
  <ul>
  <li>as service</li>
  <li>as mutators in the model</li>
  <li>as function in the controller</li>
  </ul>
  
  <p>I know i would have to call this in others places of my project. So i would like it to be a global function. What would be the best place to do it?</p>