Refactor how repositories for the daemon work.
This commit is contained in:
parent
5f9fe4a69b
commit
d2afc29a80
58 changed files with 388 additions and 997 deletions
|
@ -27,12 +27,13 @@ namespace Pterodactyl\Models;
|
|||
use Sofa\Eloquence\Eloquence;
|
||||
use Sofa\Eloquence\Validable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Znck\Eloquent\Traits\BelongsToThrough;
|
||||
use Sofa\Eloquence\Contracts\CleansAttributes;
|
||||
use Sofa\Eloquence\Contracts\Validable as ValidableContract;
|
||||
|
||||
class DaemonKey extends Model implements CleansAttributes, ValidableContract
|
||||
{
|
||||
use Eloquence, Validable;
|
||||
use BelongsToThrough, Eloquence, Validable;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
|
@ -91,6 +92,17 @@ class DaemonKey extends Model implements CleansAttributes, ValidableContract
|
|||
return $this->belongsTo(Server::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the node relation.
|
||||
*
|
||||
* @return \Znck\Eloquent\Relations\BelongsToThrough
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function node()
|
||||
{
|
||||
return $this->belongsToThrough(Node::class, Server::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the user relation.
|
||||
*
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue