$lazyCollection->prepend()
Prepends an element to the data array
$lazyCollection->prepend(string|mixed ...$args): LazyCollection
Parameters
| Name | Type | Default |
|---|---|---|
| ...$args | stringormixed |
no default value |
Return type
This method modifies the existing $lazycollection object it is applied to and returns it again.
Parent class
Examples
$collection->prepend('key', $value);
$collection->prepend($value);