/** * 重定向传值(通过Session) * @access protected * @param string|array $name 变量名或者数组 * @param mixed $value 值 * @return $this */ public function with($name, $value = null) { if (is_array($name)) { foreach ($name as $key => $val) { Session::flash($key, $val); } } else { Session::flash($name, $value); } return $this; }