# $cart->append()

> Appends an element

- Source: `src/Toolkit/Collection.php#L138` <https://github.com/getkirby/kirby/blob/6.0.0-beta.1/src/Toolkit/Collection.php#L138>
- Inherited from Kirby, not part of the Merx API. See <https://getkirby.com/docs/reference>.

```php
$cart->append(string|TValue ...$args): Kirby\Toolkit\Collection
```

## Parameters

| Name | Type | Default |
| --- | --- | --- |
| `...$args` | `string\|TValue` | `–` |

## Return type

`Kirby\Toolkit\Collection`

## Description

```php
$collection->append('key', $value);
$collection->append($value);
```

## Parent class

`Wagnerwagner\Merx\Cart` inherited from `Kirby\Toolkit\Collection`
