Added FTN list, System View

This commit is contained in:
Deon George
2022-11-25 17:44:03 +07:00
parent 102a972fcb
commit c034ce6cd4
14 changed files with 278 additions and 21 deletions

View File

@@ -129,4 +129,24 @@ class Domain extends Model
->orderBy('echoareas.name')
->get();
}
/**
* Determine if this zone is managed by this host
*
* @return bool
*/
public function managed(): bool
{
static $so = NULL;
if (is_null($so))
$so = Setup::findOrFail(config('app.id'));
return $so
->system
->addresses
->where('zone.domain.active',TRUE)
->pluck('zone.domain_id')
->contains($this->id);
}
}