Beispiel #1
0
 /**
  * Update the character standing based on the type
  *
  * @param $characterID
  * @param $standing
  * @param $type
  */
 public function _update_standing($characterID, $standing, $type)
 {
     $standing_info = Standing::firstOrNew(['characterID' => $characterID, 'fromID' => $standing->fromID]);
     $standing_info->fill(['type' => $type, 'fromName' => $standing->fromName, 'standing' => $standing->standing]);
     $standing_info->save();
     return;
 }
 /**
  * Return the standings for a character
  *
  * @param $character_id
  *
  * @return mixed
  */
 public function getCharacterStandings($character_id)
 {
     return Standing::where('characterID', $character_id)->get();
 }
Beispiel #3
0
 /**
  * Return the standings for a character
  *
  * @param int $character_id
  *
  * @return \Illuminate\Support\Collection
  */
 public function getCharacterStandings(int $character_id) : Collection
 {
     return Standing::where('characterID', $character_id)->get();
 }