Refactor destinations method in Server model

This commit is contained in:
Andras Bacsai 2024-03-02 15:58:02 +01:00
parent 130d1e1756
commit 112c259d27

View File

@ -365,8 +365,9 @@ public function destinations()
{ {
$standalone_docker = $this->hasMany(StandaloneDocker::class)->get(); $standalone_docker = $this->hasMany(StandaloneDocker::class)->get();
$swarm_docker = $this->hasMany(SwarmDocker::class)->get(); $swarm_docker = $this->hasMany(SwarmDocker::class)->get();
$asd = $this->belongsToMany(StandaloneDocker::class, 'additional_destinations')->withPivot('server_id')->get(); // $additional_dockers = $this->belongsToMany(StandaloneDocker::class, 'additional_destinations')->withPivot('server_id')->get();
return $standalone_docker->concat($swarm_docker)->concat($asd); // return $standalone_docker->concat($swarm_docker)->concat($additional_dockers);
return $standalone_docker->concat($swarm_docker);
} }
public function standaloneDockers() public function standaloneDockers()