当用户输入此条目插入数据库的所有条目但我面临一个问题时,我使用该表单中的用户表单 问题是,当用户去更新他的详细信息时,用户不能更改密码,所以密码值设置空值并插入数据库所以我的问题是如何将用户旧密码设置为密码字段 我无法理解如何将我的代码设置为低于此更新表单密码字段
<div class="form-group">
{{ Form::label('password', 'Password:', array('class'=>'col-md-2 control-label')) }}
<div class="col-sm-10">
{{ Form::password('password', array('class'=>'form-control')) }}
</div>
</div>
我希望在此字段中更改以在此字段中设置旧密码,以及当用户再次更新其表单时密码值不为空时插入数据库。
答案 0 :(得分:0)
添加到您的password
验证规则:
required
如果您使用名为password_confirmation
的额外输入并将password
命名字段添加到confirmed
验证规则,也会很好。