resource; $data = [ 'areas' => AreaResource::collection($this->whenLoaded('areaRidingCard')) ]; return array_merge(parent::toArray($request),$data); } }