为将数据追加到已存在的相同名 flash 中,可改为调用addFlash()
// 请求 #1
// 在名称为"alerts"的flash信息增加数据
$session->addFlash('alerts', 'You have successfully deleted your post.');
$session->addFlash('alerts', 'You have successfully added a new friend.');
$session->addFlash('alerts', 'You are promoted.');
// 请求 #2
// $alerts 为名为'alerts'的flash信息,为数组格式
$alerts = $session->getFlash('alerts');