Add support for more server functionality
This commit is contained in:
parent
acbc52506c
commit
5144e0126b
16 changed files with 1049 additions and 119 deletions
|
@ -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 a new issue