Level 51
You can use method values() ...
check usage in documentation
2 likes
Collection {#233 ▼
#items: array:3 [▼
0 => Post {#297 ▶}
11 => Post {#308 ▶}
10 => Post {#307 ▶}
]
}
How do I replace the array key to
Collection {#233 ▼
#items: array:3 [▼
0 => Post {#297 ▶}
1 => Post {#308 ▶}
2 => Post {#307 ▶}
]
}
You can use method values() ...
check usage in documentation
Please or to participate in this conversation.