检查密码匹配的条件 [英] Condition to check password matches
本文介绍了检查密码匹配的条件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何使用If条件检查新密码和确认密码是否匹配。所有过程都正常但匹配新密码并确认密码我该怎么办?
我尝试过:
How can i check the new password and confirm password are matches or not using If condition.All the process are working correctly but matching new and confirm password how can i do???
What I have tried:
public function TeacherUpdatePassword(Request $request)
{
$curr_password = $request->curr_password;
$new_password = $request->new_password;
$confm_password = $request->confm_password;
if(!Hash::check($curr_password,Auth::user()->password)){
echo 'The specified password does not match';
}
else{
$request->user()->fill(['password' => Hash::make($new_password)])->save();
echo 'Updated Successfully';
}
}
推荐答案
request)
{
request) {
curr_password =
curr_password =
request-> curr_password;
request->curr_password;
这篇关于检查密码匹配的条件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文