$route = function($handler) {
try {
$list = new CHV\Listing;
$list->setType('images');
$list->setOffset(0);
$list->setLimit(24); // how many?
$list->setSortType('date');
$list->setSortOrder('desc');
$list->exec();
$thumbs = [];
if($list->output_assoc) {
foreach($list->output_assoc as $k => $v) {
$thumbs[] = $v['file_resource']['chain']['thumb'];
}
}
G\debug($thumbs);
die();
} catch(Exception $e) {
G\exception_to_error($e);
}
};