I'm trying to setup some Global fields in a migration.
I'm using the SuperTable Field from verbb which is similar to a matrix field.
I'd like to add several rows during migration but can't seem to get the combination right in order to set the field values. Can someone help me out, what I've got so far is the following:
$globalSet = Craft::$app->globals->getSetByHandle("myGlobals");
$globalSet->setFieldValues([
'siteName' => "The Website",
'siteCustom' => [
'new1' => [
'type' => 'superTableBlockType',
'fields' => [
'firstField' => "some value",
'secondField' => "some other value"
]
]
]
]
);
Craft::$app->globals->saveSet($globalSet);