Fix server deletion logic, and clean up suspend/unsuspend operations

This commit is contained in:
Dane Everitt
2017-04-17 20:16:05 -04:00
parent bdfab16af3
commit de923bbb83
5 changed files with 56 additions and 81 deletions

View File

@@ -333,6 +333,16 @@ class Server extends Model
return $this->hasMany(Database::class);
}
/**
* Gets all downloads associated with a server.
*
* @return \Illuminate\Database\Eloquent\Relations\HasMany
*/
public function downloads()
{
return $this->hasMany(Download::class, 'server', 'id');
}
/**
* Gets the location of the server.
*