*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'platform_instance_id' => $this->platform_instance_id, 'channel_id' => $this->channel_id, 'name' => $this->name, 'display_name' => $this->display_name, 'description' => $this->description, 'is_active' => $this->is_active, 'created_at' => $this->created_at->toISOString(), 'updated_at' => $this->updated_at->toISOString(), 'platform_instance' => new PlatformInstanceResource($this->whenLoaded('platformInstance')), 'routes' => RouteResource::collection($this->whenLoaded('routes')), ]; } }