Skip to content

Kirby 6.0.0

$lazyCollection->findBy()

Find a single element by an attribute and its value

$lazyCollection->findBy(string $attribute, mixed $value): mixed|null

Parameters

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

Return types

mixedornull

Parent class

Kirby\Cms\LazyCollection inherited from Kirby\Cms\Collection