public function get($id)
{
$models = $this->models;
$list = $this->listing('name', 'id');
$site = null;
if (isset($models[$id])) {
$site = $models[$id];
} elseif (isset($list[$id])) {
$site = $models[$list[$id]];
} else {
try {
$uuid = $this->findUuidByName($id)->id;
} catch (\Exception $e) {
throw new TerminusException('Could not locate a site your user may access identified by {id}.', compact('id'), 1);
}
$site = $this->getContainer()->get($this->collected_class, [(object) ['id' => $uuid], ['id' => $uuid, 'collection' => $this]]);
$site->fetch();
$this->models[$uuid] = $site;
}
return $site;
}