The news on Élise Bisschop is ordered in chronological order and they retrace the entire history of her discovery.
In order to quickly see the timelaps of the story of Elise please visit the story of the process.
Click on this button to show the source code of the Controller and template used to render this page.
/**
* @Route("/search", methods="GET", name="blog_search")
*/
public function search(Request $request, PostRepository $posts): Response
{
if (!$request->isXmlHttpRequest()) {
return $this->render('blog/search.html.twig');
}
$query = $request->query->get('q', '');
$limit = $request->query->get('l', 10);
$foundPosts = $posts->findBySearchQuery($query, $limit);
$results = [];
foreach ($foundPosts as $post) {
$results[] = [
'title' => htmlspecialchars($post->getTitle(), ENT_COMPAT | ENT_HTML5),
'date' => $post->getPublishedAt()->format('M d, Y'),
'author' => htmlspecialchars($post->getAuthor()->getFullName(), ENT_COMPAT | ENT_HTML5),
'summary' => htmlspecialchars($post->getSummary(), ENT_COMPAT | ENT_HTML5),
'url' => $this->generateUrl('blog_post', ['slug' => $post->getSlug()]),
];
}
return $this->json($results);
}