I have the following array:
$fields = ['field1', 'field2', 'field3'];
What I would like to do using an existing helper ('hopefully') is to convert those array string values into object key value pairs with an empty value.
This is the desired output:
$fields = (object) [
'field1' => '',
'field2' => '',
'field3' => '',
];
Is it possible to do that using a Laravel helper, so I don't have to use my own function?