You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rotate the items in the collection with given offset
287
+
288
+
```php
289
+
$collection = collect([1, 2, 3, 4, 5, 6]);
290
+
291
+
$rotate = $collection->rotate(1);
292
+
293
+
$rotate->toArray();
294
+
295
+
// [2, 3, 4, 5, 6, 1]
296
+
```
297
+
283
298
### `sectionBy`
284
299
285
300
Splits a collection into sections grouped by a given key. Similar to `groupBy` but respects the order of the items in the collection and reuses existing keys.
Extract the tail from a collection. So everything except the first element. It's a shorthand for `slice(1)->values()`, but nevertheless very handy. It's a shorthand for `slice(1)->values()`. If the optional parameter `$preserveKeys` as `true` is passed, it will preserve the keys and fallback to `slice(1)`.
0 commit comments