$this->id, 'name' => $this->name, 'fee_id' => $this->fee_id, 'fee_name' => $this->fee->name, 'amount_human' => number_format($this->getAmount() / 100, 2, ',', '.') . ' €', 'amount' => $this->getAmount(), 'children' => SubscriptionChildResource::collection($this->whenLoaded('children')), ]; } /** * @return array */ public static function meta(): array { return [ 'links' => [ 'index' => route('subscription.index'), 'create' => route('subscription.create'), ], ]; } }