Using Drupal 8 i am importing data from an external source and creating the node programmatically from the controller:
$node = Node::create(array(
'type' => 'article',
'title' => 'some title'
));
$node->save();
I want to add some extra field with the external id (e.g. "3cru_81pazBBRbj5e8LZkZ").
Adding of the field should happen programmatically within the module without the need of the user having to add it via the ui.
I have been reading up on this but i have come to the point that tutorials have confused me more then helped me.
Any help would be greatly appreciated.