Include egg variables in the output from the API

This commit is contained in:
Dane Everitt 2020-08-22 15:43:28 -07:00
parent 3a2c60ce31
commit cae604e79d
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
12 changed files with 204 additions and 92 deletions

View file

@ -143,6 +143,10 @@ class ServerRepository extends EloquentRepository implements ServerRepositoryInt
*/
public function getVariablesWithValues(int $id, bool $returnAsObject = false)
{
$this->getBuilder()
->with('variables', 'egg.variables')
->findOrFail($id);
try {
$instance = $this->getBuilder()->with('variables', 'egg.variables')->find($id, $this->getColumns());
} catch (ModelNotFoundException $exception) {