This is a demo application built in the Symfony Framework to illustrate the recommended way of developing Symfony applications.
For more information, check out the Symfony doc.
Click on this button to show the source code of the Controller and template used to render this page.
/**
* @Route("/search", name="blog_search")
* @Method("GET")
*/
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()),
'date' => $post->getPublishedAt()->format('M d, Y'),
'author' => htmlspecialchars($post->getAuthor()->getFullName()),
'summary' => htmlspecialchars($post->getSummary()),
'url' => $this->generateUrl('blog_post', ['slug' => $post->getSlug()]),
];
}
return $this->json($results);
}
Account Number: 286502000000014
Bank Name : Indian Overseas Bank
Branch: Nawada
IFSC Code: IOBA0002865