This commit is contained in:
Andras Bacsai
2024-09-23 19:51:31 +02:00
parent 68efd4b553
commit b570ccd7d3
46 changed files with 236 additions and 211 deletions

View File

@@ -35,14 +35,17 @@ class ScheduledDatabaseBackup extends BaseModel
{
return $this->hasMany(ScheduledDatabaseBackupExecution::class)->where('created_at', '>=', now()->subDays($days))->get();
}
public function server()
{
if ($this->database) {
if ($this->database->destination && $this->database->destination->server) {
$server = $this->database->destination->server;
return $server;
}
}
return null;
}
}