Example #1
0
 /**
  * Get the total income
  *
  */
 public function income()
 {
     $income = 0;
     $sales = Sale::get();
     foreach ($sales as $sale) {
         $income += $sale->total;
     }
     return $income;
 }