collection()
Returns the result of a collection by name
collection(string $name): Kirby\Cms\Collection|null
Parameters
Name | Type | Default |
---|---|---|
$name * | string |
– |
Return type
Kirby\Cms\Collection
|null
Examples
$customCollection = collection('projects');
dump($customCollection);