Skip to content

Kirby 5.0.1

$collection->findBy()

Find a single element by an attribute and its value

$collection->findBy(string $attribute, $value): TValue|null

Parameters

Name Type Default
$attributerequired string no default value
$valuerequired mixed no default value

Return types

TValueornull

Parent class

Kirby\Toolkit\Collection