$pages->findBy()
Find a single element by an attribute and its value
$pages->findBy(string $attribute, mixed $value): mixed
Parameters
Name | Type | Default | Description |
---|---|---|---|
$attribute |
string |
|
|
$value |
mixed |
|
Return type
mixed
Example
<?= $page->children()->findBy('uid', 'some-page')->title() ?>