oh wow, it is cool!

This commit is contained in:
Andras Bacsai
2023-09-14 15:52:04 +02:00
parent 53c20e1e99
commit 8412802f4d
11 changed files with 194 additions and 24 deletions

View File

@@ -105,6 +105,14 @@ class Server extends BaseModel
})->flatten();
}
public function previews() {
return $this->destinations()->map(function ($standaloneDocker) {
return $standaloneDocker->applications->map(function ($application) {
return $application->previews;
})->flatten();
})->flatten();
}
public function destinations()
{
$standalone_docker = $this->hasMany(StandaloneDocker::class)->get();