diff --git a/app/Models/Domain.php b/app/Models/Domain.php index 260a399..c7398a5 100644 --- a/app/Models/Domain.php +++ b/app/Models/Domain.php @@ -123,20 +123,18 @@ class Domain extends Model }); } - public function isManaged(): bool - { - return our_address()->pluck('zone.domain')->pluck('id')->contains($this->id); - } - /** * Determine if this zone is managed by this host * * @return bool - * @deprecated use self::isManaged(); + * @throws \Exception */ - public function managed(): bool + public function isManaged(): bool { - return our_address($this)->count() > 0; + return ($x=our_address()) + && $x->pluck('zone.domain') + ->pluck('id') + ->contains($this->id); } /** diff --git a/resources/views/about.blade.php b/resources/views/about.blade.php index e2f4b48..46b2bdc 100644 --- a/resources/views/about.blade.php +++ b/resources/views/about.blade.php @@ -178,7 +178,7 @@ ->orderBy('name') ->with(['echoareas']) ->get() as $o) - @if ($o->managed()) + @if ($o->isManaged()) { name: '{{ $o->name }}', data: [], diff --git a/resources/views/domain/addedit.blade.php b/resources/views/domain/addedit.blade.php index 3478c0e..a51b9ee 100644 --- a/resources/views/domain/addedit.blade.php +++ b/resources/views/domain/addedit.blade.php @@ -1,3 +1,4 @@ + @extends('layouts.app') @section('htmlheader_title') @@ -62,7 +63,7 @@ use App\Models\Echoarea;