内核更新
This commit is contained in:
@@ -495,15 +495,16 @@ if (!function_exists('redirect')) {
|
||||
* @param mixed $url 重定向地址 支持Url::build方法的地址
|
||||
* @param array|integer $params 额外参数
|
||||
* @param integer $code 状态码
|
||||
* @param array $with 隐式传参
|
||||
* @return \think\response\Redirect
|
||||
*/
|
||||
function redirect($url = [], $params = [], $code = 302)
|
||||
function redirect($url = [], $params = [], $code = 302, $with = [])
|
||||
{
|
||||
if (is_integer($params)) {
|
||||
$code = $params;
|
||||
$params = [];
|
||||
}
|
||||
return Response::create($url, 'redirect', $code)->params($params);
|
||||
return Response::create($url, 'redirect', $code)->params($params)->with($with);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user