Php Return Input::except()Laravel 4中的多个输入
我和拉威尔4号一起工作 我正在使用验证程序验证表单:Php Return Input::except()Laravel 4中的多个输入,php,validation,laravel,laravel-4,Php,Validation,Laravel,Laravel 4,我和拉威尔4号一起工作 我正在使用验证程序验证表单: $validator=validator::make(输入::all(),$rules) 当它失败时: if ($validator->fails()) { return Redirect::to('register/test') ->withErrors($validator) ->wit
$validator=validator::make(输入::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
}
如何返回除多个输入之外的输入,而不仅仅是密码
我试过输入::除了('password','avatar')代码>但它不工作
任何帮助都将不胜感激 事实上,我发现我忘记了用输入::old(“”)
来重新填充输入
所以解决方案就是我尝试过的Input::except('password','avatar')代码>试试看
Input::except(array('password', 'avatar'));
我用的是Laravel4.2。请查看第253行函数中的\vendor\laravel\framework\src\illumb\Http\Request.php,除了($keys)@param$keys是数组