Php Laravel resetPassword()抛出带“的;尝试分配非对象的属性“;

Php Laravel resetPassword()抛出带“的;尝试分配非对象的属性“;,php,laravel,laravel-5.1,Php,Laravel,Laravel 5.1,我想更改当前用户的密码: 公共功能后更改(请求$Request) { $user=\Auth::user(); $this->validate$请求[ 'oldpassword'=>'required', “密码”=>“必需”|已确认|最小值:6', ]); 如果(\Hash::check($request->oldpassword,$user->password)){ $this->resetPassword($user->email,$request->password); }否则{ ret

我想更改当前用户的密码:

公共功能后更改(请求$Request)
{
$user=\Auth::user();
$this->validate$请求[
'oldpassword'=>'required',
“密码”=>“必需”|已确认|最小值:6',
]);
如果(\Hash::check($request->oldpassword,$user->password)){
$this->resetPassword($user->email,$request->password);
}否则{
return\Redirect::back()->withErrors('旧密码不正确');
}
}
但我得到了这个错误:

ResetsPasswords.php第134行中的ErrorException:

尝试分配非对象的属性

我需要做什么改变才能让这一切顺利进行

$this->resetPassword($user->email,$request->password);

必须传递完整的用户对象作为第一个参数:

$this->resetPassword($user,$request->password);

请看。

很抱歉,没有问题,如何获取当前用户对象?