Hi,
$attributeList = $this->Attributes->find(‘all’)
->select()
->contain([‘OptionsAttributes’ => function($q){
return $q;
}])->toArray();
How to convert object data to array?
I can convert using
$results = Hash::extract($attributeList, '{n}');
But I didn’t get contain([‘OptionsAttributes’]) value in array type.
How to convert it in an array?