mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-23 08:43:46 +02:00
Add ServerTransfer relation in Models/Server.php, notify the new daemon about the incoming server transfer
This commit is contained in:
@@ -51,6 +51,7 @@ use Znck\Eloquent\Traits\BelongsToThrough;
|
||||
* @property \Pterodactyl\Models\Location $location
|
||||
* @property \Pterodactyl\Models\DaemonKey $key
|
||||
* @property \Pterodactyl\Models\DaemonKey[]|\Illuminate\Database\Eloquent\Collection $keys
|
||||
* @property \Pterodactyl\Models\ServerTransfer $transfer
|
||||
*/
|
||||
class Server extends Validable
|
||||
{
|
||||
@@ -337,4 +338,14 @@ class Server extends Validable
|
||||
{
|
||||
return $this->hasMany(DaemonKey::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns all of the daemon keys belonging to this server.
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Relations\HasOne
|
||||
*/
|
||||
public function transfer()
|
||||
{
|
||||
return $this->hasOne(ServerTransfer::class)->orderByDesc('id');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user