public function update(PasswordUpdateRequest $request)
    {
        $password = $request->new_password;

        if (Hash::check($request->old_password, Auth::user()->password)) {
            $this->resetPassword(Auth::user(), $password);
            return redirect('user/settings')
                ->with('message', 'Password updated successfully');
        }

        return back()->withErrors(['Password could not be updated']);
    }
public function update(PasswordUpdateRequest $request)
    {
        $password = $request->new_password;

        if (Hash::check($request->old_password, Auth::user()->password)) {
            $this->resetPassword(Auth::user(), $password);
            return redirect('user/settings')
                ->with('message', 'Password updated successfully');
        }

        return back()->withErrors(['Password could not be updated']);
    }
public function update ( PasswordUpdateRequest $ request ) { $ password = $ request -> new_password ; if ( Hash :: check ( $ request -> old_password , Auth :: user ( ) -> password ) ) { $ this -> resetPassword ( Auth :: user ( ) , $ password ) ; return redirect ( 'user/settings' ) -> with ( 'message' , 'Password updated successfully' ) ; } return back ( ) -> withErrors ( [ 'Password could not be updated' ] ) ; }
Change the user's password and return

@param  PasswordUpdateRequest $request
@return Response
Change the user s password and return