<?php
namespace Customize\Controller;
use Eccube\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Annotation\Route;
use Symfony\Component\HttpFoundation\Session\SessionInterface;
class SessionController2 extends AbstractController
{
/**
* @Route("/set-session2/{id}", name="set_session2")
*/
public function setCustomSession2(SessionInterface $session, string $id): Response
{
// セッションに値を設定
$session->set('blb_id2', $id);
// リダイレクトする先のルートに飛ぶ
// return $this->redirect('https://tpscoco.com/user_data/news_list');
return $this->redirect('/user_data/news');
}
}