Add in query caching on server view
This commit is contained in:
parent
ff9904227b
commit
9af06b4b59
14 changed files with 263 additions and 19 deletions
|
@ -186,9 +186,9 @@ class User extends Model implements AuthenticatableContract, AuthorizableContrac
|
|||
*
|
||||
* @return Collection
|
||||
*/
|
||||
public function serverAccessCollection($paginate = null)
|
||||
public function serverAccessCollection($paginate = null, $load = ['service', 'node', 'allocation'])
|
||||
{
|
||||
$query = Server::with('service', 'node');
|
||||
$query = Server::with($load);
|
||||
if (! $this->isRootAdmin()) {
|
||||
$query->whereIn('id', $this->serverAccessArray());
|
||||
}
|
||||
|
|
Reference in a new issue