Example #1
0
 /**
  * Update the corporation standing based on the type
  *
  * @param $standing
  * @param $type
  */
 public function _update_standing($standing, $type)
 {
     $standing_info = Standing::firstOrNew(['corporationID' => $this->corporationID, 'fromID' => $standing->fromID]);
     $standing_info->fill(['type' => $type, 'fromName' => $standing->fromName, 'standing' => $standing->standing]);
     $standing_info->save();
     return;
 }
 /**
  * Return the standings for a Corporation
  *
  * @param $corporation_id
  *
  * @return mixed
  */
 public function getCorporationStandings($corporation_id)
 {
     return Standing::where('corporationID', $corporation_id)->get();
 }
Example #3
0
 /**
  * Return the standings for a Corporation
  *
  * @param $corporation_id
  *
  * @return mixed
  */
 public function getCorporationStandings(int $corporation_id) : Collection
 {
     return Standing::where('corporationID', $corporation_id)->get();
 }