toArray(); } /** * Return the parent service variable data. * * @throws \App\Exceptions\Transformer\InvalidTransformerLevelException */ public function includeParent(EggVariable $variable): Item|NullResource { if (!$this->authorize(Egg::RESOURCE_NAME)) { return $this->null(); } $variable->loadMissing('variable'); return $this->item($variable->getRelation('variable'), $this->makeTransformer(EggVariableTransformer::class), 'variable'); } }