$lazyCollection->update()
Updates an object in the collection
$lazyCollection->update(string|mixed $key, mixed|null $object = null): LazyCollection
Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| $keyrequired | stringormixed |
no default value | Key or object to update |
| $object | mixedornull |
null
|
New object for the key |
Return type
This method modifies the existing $lazycollection object it is applied to and returns it again.
Parent class
Kirby\Cms\LazyCollection
inherited from Kirby\Cms\Collection