Symfony Demo
  • Homepage
  • Search
  • Choose language

    Choose your language

    • العربية ar
    • Български bg
    • বাংলা bn
    • Bosanski bs
    • Català ca
    • Čeština cs
    • Deutsch de
    • English en
    • Español es
    • Euskara eu
    • Français fr
    • Hrvatski hr
    • Indonesia id
    • Italiano it
    • 日本語 ja
    • Lietuvių lt
    • नेपाली ne
    • Nederlands nl
    • Polski pl
    • Português (brasil) pt_BR
    • Română ro
    • Русский ru
    • Slovenščina sl
    • Shqip sq
    • Српски (ћирилица) sr_Cyrl
    • Srpski (latinica) sr_Latn
    • Türkçe tr
    • Українська uk
    • Tiếng việt vi
    • 中文(中国) zh_CN

Sunt accentores vitare salvus flavum parses

December 31, 2025 at 4:13:13 PM Tom Doe

Pellentesque et sapien pulvinar consectetur. Ubi est barbatus nix. Sunt seculaes transferre talis camerarius fluctuies. Ut suscipit posuere justo at vulputate. Vae humani generis. Abnobas sunt hilotaes de placidus vita.

adipiscing consectetur dolore pariatur

Sunt seculaes transferre talis camerarius fluctuies

December 29, 2025 at 5:49:29 PM Tom Doe

Eposs sunt solems de superbus fortis. Potus sensim ad ferox abnoba. Mauris dapibus risus quis suscipit vulputate. Sunt accentores vitare salvus flavum parses. Aliquam sodales odio id eleifend tristique. Mineralis persuadere omnes finises desiderium.

ipsum labore lorem pariatur

  • Previous
  • 1
  • 2 (current)
  • Next

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.

Source code used to render this page

src/Controller/BlogController.php at line 52

/**
 * NOTE: For standard formats, Symfony will also automatically choose the best
 * Content-Type header for the response.
 *
 * See https://symfony.com/doc/current/routing.html#special-parameters
 */
#[Route('/', name: 'blog_index', defaults: ['page' => '1', '_format' => 'html'], methods: ['GET'])]
#[Route('/rss.xml', name: 'blog_rss', defaults: ['page' => '1', '_format' => 'xml'], methods: ['GET'])]
#[Route('/page/{page}', name: 'blog_index_paginated', defaults: ['_format' => 'html'], requirements: ['page' => Requirement::POSITIVE_INT], methods: ['GET'])]
#[Cache(smaxage: 10)]
public function index(Request $request, int $page, string $_format, PostRepository $posts, TagRepository $tags): Response
{
    $tag = null;

    if ($request->query->has('tag')) {
        $tag = $tags->findOneBy(['name' => $request->query->get('tag')]);
    }

    $latestPosts = $posts->findLatest($page, $tag);

    // Every template name also has two extensions that specify the format and
    // engine for that template.
    // See https://symfony.com/doc/current/templates.html#template-naming
    return $this->render('blog/index.'.$_format.'.twig', [
        'paginator' => $latestPosts,
        'tagName' => $tag?->getName(),
    ]);
}

templates/blog/index.html.twig at line 1

Blog Posts RSS

© 2026 - The Symfony Project

MIT License

X/Twitter RSS feed