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
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
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.
*