Last active
May 15, 2024 19:06
-
-
Save lchrusciel/4bf1b7bb5e168509555c5c9c9f2cff9c to your computer and use it in GitHub Desktop.
Sample controller from Symfony docs (https://symfony.com/doc/current/routing.html)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// src/Controller/BlogController.php | |
namespace App\Controller; | |
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; | |
use Symfony\Component\HttpFoundation\Response; | |
use Symfony\Component\Routing\Attribute\Route; | |
class BlogController extends AbstractController | |
{ | |
#[Route('/blog', name: 'blog_list')] | |
public function list(): Response | |
{ | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment