CSV to Structure Field

Might add that when using yaml (which returns an array instead of a structure object), you cannot use $structure->add() (and that method would require a structure item as param, not an array which you pass to it).

So

$structure = page('register')->content()->subscribers()->yaml();

foreach ($csv as $user) {
    $structure[] = [
	'email'     	 => $user['Email'],
	'name'      	 => $user['Name'],
	'orderID'        => $user['OrderID'],
	'datesubscribed' => $user['Paid'],
			];
}
$newPage = $parent->update([
    'subscribers' => Data::encode($structure, 'yaml'),
]);