public function get($id)
{
$models = $this->getMembers();
if (isset($models[$id])) {
return $models[$id];
}
foreach ($models as $model) {
$org = $model->get('organization');
$org_profile = $org->profile;
if (in_array($id, [$org->id, $org_profile->name, $org_profile->machine_name])) {
return $model;
}
}
throw new TerminusNotFoundException('An organization of which you are a member, identified by "{id}", could not be found.', compact('id'));
}