Bolt\Controller\Async\General::getLastmodifiedSimple PHP Method

getLastmodifiedSimple() private method

Only get latest {contenttype} record edits based on date changed.
private getLastmodifiedSimple ( string $contenttypeslug ) : TemplateResponse
$contenttypeslug string
return Bolt\Response\TemplateResponse
    private function getLastmodifiedSimple($contenttypeslug)
    {
        // Get the proper contenttype.
        $contenttype = $this->getContentType($contenttypeslug);
        // Get the 'latest' from the requested contenttype.
        $latest = $this->getContent($contenttype['slug'], ['limit' => 5, 'order' => 'datechanged DESC', 'hydrate' => false]);
        $context = ['latest' => $latest, 'contenttype' => $contenttype];
        $response = $this->render('@bolt/components/panel-lastmodified.twig', ['context' => $context]);
        $response->setPublic()->setSharedMaxAge(60);
        return $response;
    }