示例#1
0
 /**
  * Write an entry to the MemberSecurity table
  *
  * @param $rawRoles
  * @param $roleType
  */
 private function writeEntry($rawRoles, $roleType)
 {
     // Add each type of role for this character
     foreach ($rawRoles as $role) {
         MemberSecurityModel::create(['corporationID' => $this->getCorporationID(), 'characterID' => $this->member->characterID, 'characterName' => $this->member->name, 'roleType' => $roleType, 'roleID' => $role->roleID, 'roleName' => $role->roleName]);
     }
 }
 /**
  * Get the Member Security for a Corporation
  *
  * @param $corporation_id
  *
  * @return mixed
  */
 public function getCorporationMemberSecurity($corporation_id)
 {
     return MemberSecurity::where('corporationID', $corporation_id)->get();
 }