Less obtuse mounting code
This commit is contained in:
parent
96fef94578
commit
9d95c5ab32
4 changed files with 89 additions and 23 deletions
39
app/Models/MountNode.php
Normal file
39
app/Models/MountNode.php
Normal file
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
use Pterodactyl\Models\Node;
|
||||
use Pterodactyl\Models\Mount;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class MountNode extends Model
|
||||
{
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $timestamps = false;
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $incrementing = false;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $table = 'mount_node';
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function node()
|
||||
{
|
||||
return $this->belongsTo(Node::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||
*/
|
||||
public function mount()
|
||||
{
|
||||
return $this->belongsTo(Mount::class);
|
||||
}
|
||||
}
|
Reference in a new issue