mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-18 14:23:44 +02:00
Add support for more server functionality
This commit is contained in:
@@ -76,4 +76,26 @@ class LocationRepository extends EloquentRepository implements LocationRepositor
|
||||
|
||||
return $location->delete();
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function allWithDetails()
|
||||
{
|
||||
return $this->getBuilder()->withCount('nodes', 'servers')->get($this->getColumns());
|
||||
}
|
||||
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function getWithNodes($id)
|
||||
{
|
||||
$instance = $this->getBuilder()->with('nodes.servers')->find($id, $this->getColumns());
|
||||
|
||||
if (! $instance) {
|
||||
throw new RecordNotFoundException();
|
||||
}
|
||||
|
||||
return $instance;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user