php – 在Laravel 4中返回Input :::()多个输入
发布时间:2020-12-14 19:48:43 所属栏目:大数据 来源:网络整理
导读:我正在与Laravel 4合作, 我正在使用验证器验证表单: $validator = Validator :: make(Input :: all(),$rules); 失败时: if ($validator-fails()) { return Redirect::to('register/test') -withErrors($validator) -withInput(Input::except('password'));
我正在与Laravel 4合作,
我正在使用验证器验证表单: $validator = Validator :: make(Input :: all(),$rules); 失败时: if ($validator->fails()) { return Redirect::to('register/test') ->withErrors($validator) ->withInput(Input::except('password')); // send back the input so that we can repopulate the form } 除了多个输入,我怎样才能返回输入,而不仅仅是密码? 我尝试过Input :: except(‘password’,’avatar’);但它不起作用. 任何帮助将不胜感激!
实际上,我发现我忘了把Input :: old(”)重新填充输入, 所以解决方案是exaclty我尝试过Input :: except(‘password’,’avatar’); (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |