i have an array like below :
array:3 [
0 => array:1 [
1 => array:2 [
"type" => "validation"
"message" => "this item not valid"
]
]
1 => array:1 [
1 => array:2 [
"type" => "duplicate"
"message" => "This item is duplicate"
]
]
3 => array:1 [
2 => array:2 [
"type" => "duplicate"
"message" => "This item is duplicate"
]
]
]
i want to skip the array index and just return the nested items of array like below :
{
"1": {
"type": "validation",
"message: "this item not valid"
},
"1": {
"type": "duplicate",
"message: "this item not valid"
},
"2": {
"type": "validation",
"message: "this item not valid"
},
}
i want its type to be array so i can return it in laravel ValidationException::withMessages
thanks