Refactor destinations method in Server model
This commit is contained in:
parent
130d1e1756
commit
112c259d27
@ -365,8 +365,9 @@ public function destinations()
|
||||
{
|
||||
$standalone_docker = $this->hasMany(StandaloneDocker::class)->get();
|
||||
$swarm_docker = $this->hasMany(SwarmDocker::class)->get();
|
||||
$asd = $this->belongsToMany(StandaloneDocker::class, 'additional_destinations')->withPivot('server_id')->get();
|
||||
return $standalone_docker->concat($swarm_docker)->concat($asd);
|
||||
// $additional_dockers = $this->belongsToMany(StandaloneDocker::class, 'additional_destinations')->withPivot('server_id')->get();
|
||||
// return $standalone_docker->concat($swarm_docker)->concat($additional_dockers);
|
||||
return $standalone_docker->concat($swarm_docker);
|
||||
}
|
||||
|
||||
public function standaloneDockers()
|
||||
|
Loading…
Reference in New Issue
Block a user