public static function boot() { parent::boot(); Account::created(function ($account) { // destiny stuff $data = new Data(); $data->account_id = $account->id; $data->membershipId = $account->destiny_membershipId; $data->save(); // halo 5 stuff $h5_data = new H5Data(); $h5_data->account_id = $account->id; $h5_data->save(); }); }
/** * @param \Onyx\Destiny\Objects\Data $destiny * @param array $chars */ private function tabulateActivity($destiny, $chars) { $reset = false; foreach ($chars as $key => $value) { if ($value) { $reset = true; } } if ($reset) { $destiny->inactiveCounter = 0; $destiny->save(); } else { $destiny->inactiveCounter++; $destiny->save(); } }