Fix binkp remote closing connection, add/delete session details, menu item this system, minor CSS fixes, move system form editing to individual files
This commit is contained in:
@@ -23,6 +23,37 @@ class System extends Model
|
||||
->orderBy('point_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* Session Passwords for system
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsToMany
|
||||
*/
|
||||
public function sessions()
|
||||
{
|
||||
return $this->belongsToMany(Zone::class)
|
||||
->withPivot(['sespass','pktpass','ticpass','fixpass','zt_ipv4','zt_ipv6']);
|
||||
}
|
||||
|
||||
/**
|
||||
* If this system is configured as this host
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function setup()
|
||||
{
|
||||
return $this->hasOne(Setup::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Zones a system has addresses for
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasManyThrough
|
||||
*/
|
||||
public function zones()
|
||||
{
|
||||
return $this->hasManyThrough(Zone::class,Address::class,'system_id','id','id','zone_id');
|
||||
}
|
||||
|
||||
/* GENERAL METHODS */
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user