convert array to array with 1 prop laravel code example
Example 1: convert array to object php
$arrayResult = array_map(function($array){
return (object)$array;
}, $yourOrinalArray);
Example 2: cast array to object php
$object = (object) $array;