this is too ---->$collection = collect([1, 2, 3, 4, 5, 6, 7]);
$chunks = $collection->chunk(4);
$chunks->toArray(); result : [[1,2,3,4],{"4":5,"5":6,"6":7}]
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community