Laravel 可以在本地主机上更新用户密码,但不能在共享主机服务器上更新

Laravel 可以在本地主机上更新用户密码,但不能在共享主机服务器上更新,laravel,laravel-5,Laravel,Laravel 5,这是更新用户密码的功能 function update_systemusers_password($input) { $systemusers = users::find($input['userid']); $systemusers->password = bcrypt($input['password']); $systemusers->save(); } 但是,它不会在共享主机服务器中更新。首先,您需要确认您的功能是否已

这是更新用户密码的功能

function update_systemusers_password($input)   {   
     $systemusers = users::find($input['userid']);   
     $systemusers->password = bcrypt($input['password']);  
     $systemusers->save();   
}

但是,它不会在共享主机服务器中更新。首先,您需要确认您的功能是否已执行。试试这样的方法来确保

function update_systemusers_password($input)   {   
 dd($input); //  it will show the all of input
 $systemusers = users::find($input['userid']);   
 $systemusers->password = bcrypt($input['password']);  
 $systemusers->save();   
}
如果dd();打印请求的所有值,然后删除dd();在函数内部,编写一些条件以进行确认

function update_systemusers_password($input)   {   
 $systemusers = users::find($input['userid']);   
 $systemusers->password = bcrypt($input['password']);  
 if($systemusers->save()){
  dd("save successfully");
 }
 else{
  dd("found error");
 }   
}

它在托管服务器中说了什么?抛出任何错误?没有错误消息,它表示成功,但密码未更新您需要开始调试!
update\u systemusers\u password()
方法是否执行?尝试在不同的点在方法中记录任意字符串,或回显响应,以查看出现问题的点。您可能对.env.php或database.phpy有问题。您应该在主机名中使用localhost,因为您无法从服务器内部远程连接。在更新自己的密码时,它会显示另一个用户id。如何才能这件事必须解决。