add logic

This commit is contained in:
ayntk-ai
2024-08-16 16:01:41 +02:00
parent d906bb2381
commit dab5f0fe09
4 changed files with 97 additions and 44 deletions

View File

@@ -28,4 +28,16 @@ class ScheduledTask extends BaseModel
{
return $this->hasMany(ScheduledTaskExecution::class);
}
}
public function server()
{
if ($this->application) {
return $this->application->server;
} elseif ($this->database) {
return $this->database->server;
} elseif ($this->service) {
return $this->service->server;
}
return null;
}
}