Symfony Demo
  • Homepage
  • Search
  • Choose language
    • العربية ar
    • Български bg
    • Bosanski bs
    • Català ca
    • Čeština cs
    • Deutsch de
    • English en
    • Español es
    • Français fr
    • Hrvatski hr
    • Indonesia id
    • Italiano it
    • 日本語 ja
    • Lietuvių lt
    • Nederlands nl
    • Polski pl
    • Português (brasil) pt
    • Română ro
    • Русский ru
    • Slovenščina sl
    • Српски (ћирилица) sr
    • Srpski (latinica) sr
    • Türkçe tr
    • Українська uk
    • 中文(中国) zh

Ut suscipit posuere justo at vulputate

November 29, 2017 at 4:36:43 PM Tom Doe

Morbi tempus commodo mattis. Abnobas sunt hilotaes de placidus vita. Pellentesque et sapien pulvinar consectetur. Ubi est audax amicitia. Urna nisl sollicitudin id varius orci quam id turpis. Potus sensim ad ferox abnoba.

adipiscing incididunt voluptate

Aliquam sodales odio id eleifend tristique

November 27, 2017 at 4:36:43 PM Tom Doe

Potus sensim ad ferox abnoba. Sunt accentores vitare salvus flavum parses. Nulla porta lobortis ligula vel egestas. Mineralis persuadere omnes finises desiderium. Sunt torquises imitari velox mirabilis medicinaes.

consectetur adipiscing voluptate pariatur

Silva de secundus galatae demitto quadra

November 13, 2017 at 4:36:43 PM Tom Doe

Nunc viverra elit ac laoreet suscipit. Pellentesque et sapien pulvinar consectetur. Lorem ipsum dolor sit amet consectetur adipiscing elit. Potus sensim ad ferox abnoba. Sunt torquises imitari velox mirabilis medicinaes.

adipiscing voluptate dolore pariatur

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

Controller codesrc/Controller/BlogController.php at line 51

/**
 * 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
 */
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 ? $tag->getName() : null,
    ]);
}

Twig template codetemplates/blog/index.html.twig at line 1

Blog Posts RSS

© 2026 - The Symfony Project

MIT License