Merx

$cart->first()

Returns the first element

$cart->first(): TValue|null

Return type

TValue or null

Parent class

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