Is it possible to do something like this with routes?
In my scenario, there is a handwritten “Signature” image that is being supplied in the panel.
array(
'method' => 'GET',
'pattern' => 'proxy/signature',
'action' => function() {
$site = kirby()->site();
$home = $site->pages()->find('home');
$signatureString = $home->signature();
$signatureImage = $home->files()->find($signatureString);
if ($signatureImage) {
// making this part up..
return response::image($signatureImage);
} else {
return // fallback image
}
}
),