mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-17 13:53:45 +02:00
Add in query caching on server view
This commit is contained in:
@@ -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 New Issue
Block a user