fix: improve scheduled task adding/removing

This commit is contained in:
Andras Bacsai committed 2024-05-14 15:19:28 +02:00
1 parent f06065337c
commit 317dc10af4
12 files changed
+123 -56

No files matched your search

+11
View File
@@ -677,6 +677,17 @@ class Service extends BaseModel
{
return $this->belongsTo(Server::class);
}
public function byUuid(string $uuid) {
$app = $this->applications()->whereUuid($uuid)->first();
if ($app) {
return $app;
}
$db = $this->databases()->whereUuid($uuid)->first();
if ($db) {
return $db;
}
return null;
}
public function byName(string $name)
{
$app = $this->applications()->whereName($name)->first();