how to convert an array into object type in laravel code example Example: php convert array to object $object = (object) $array;