use Symfony\Component\HttpFoundation\Session\Session;
$session = new Session();
$session->getFlashBag()->add('success', 'Message');
или
public function __construct(SessionInterface $session)
{
$this->session = $session;
}
$this->session->getFlashBag()->add('success', 'Message');