Fix System ZC identification

This commit is contained in:
Deon George 2021-08-15 16:01:51 +10:00
parent 414a10f84e
commit ae96ff9a24
2 changed files with 2 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class System extends Model
*/
public function zcs()
{
return $this->belongsToMany(Zone::class);
return $this->hasMany(Zone::class);
}
/**

View File

@ -14,7 +14,7 @@ use App\Http\Controllers\DomainController as DC;
@if($o->setup)<sup class="success" style="float:right;top:-2em;">* This Host</sup>@endif
@endif
@if($o->zcs)
@if($o->zcs->count())
<p>This system is the ZC for the following zones: <strong class="highlight">{!! $o->zcs->map(function($item) { return sprintf('%d@%s',$item->zone_id,$item->domain->name); })->join('</strong>, <strong class="highlight">') !!} </strong></p>
@endif