Example #1
0
 private static function AddValueToStatistic($value, $statistic_name)
 {
     $statistic = Statistic::where('name', $statistic_name)->first();
     if (!$statistic) {
         Log::critical(array('method' => __METHOD__, 'value' => $value, 'name' => $statistic_name));
         return;
     }
     $statistic->value = $statistic->value + $value;
     $statistic->save();
 }