Skip to content

Kirby 4.3.0


Sets the object class, which should be fetched; set this to 'array' to get a simple array instead of an object; pass a function that receives the $data and the $key to generate arbitrary data structures

$query->fetch(Closure|callable|string $fetch): Kirby\Database\Query


Name Type Default
$fetch * Closure|callable|string

Return type


This method does not modify the existing $query object but returns a new object with the changes applied. Learn more →

Parent class