@scotty_walker
In Symfony, to have multiple sessions, you can create multiple session handlers with different names. Here's how you can achieve this:
1 2 3 4 5 6 7 |
framework:
session:
handlers:
primary:
...
secondary:
...
|
1 2 3 4 5 6 7 8 9 10 11 |
use SymfonyComponentHttpFoundationSessionSessionInterface;
class MyController extends AbstractController
{
public function index(SessionInterface $session)
{
$session->setId('secondary');
// Use the secondary session handler
}
}
|
By following these steps, you can have multiple sessions in Symfony with different configurations.