Return all servers for a node as a paginated response

Avoids crashing the PHP process and avoids a bad runaway N+1 query issue that previously existed.
This commit is contained in:
Dane Everitt 2020-10-31 11:14:28 -07:00
parent 73b795faba
commit c00e5b36a5
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 56 additions and 57 deletions

View file

@ -83,6 +83,13 @@ class Server extends Model
'oom_disabled' => true,
];
/**
* The default relationships to load for all server models.
*
* @var string[]
*/
protected $with = ['allocation'];
/**
* The attributes that should be mutated to dates.
*