mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-21 19:16:23 +00:00
686 B
686 B
date | id | title |
---|---|---|
2020-11-16 | c6e1c9cf-d282-436e-b8fe-dbb62a1b2459 | Stateless Route Attribute |
Description
When set to true
declare that session can't
be used during handling of request. Generates Exception if route tries
to use the session.
Syntax
// src/Controller/MainController.php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class MainController extends AbstractController
{
/**
* @Route("/", name="homepage", stateless=true)
*/
public function homepage()
{
// ...
}
}