app/Http/Controllers/Admin/passwordsettingsController.php
/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
Store a newly created resource in storage.
Store a newly created resource in storage .
public function store(Request $request)
    {
        $request->validate([
            'current_password' => ['required', new MatchOldPassword],
            'new_password' => ['required'],
            'new_confirm_password' => ['same:new_password'],
        ]);
        User::find(Auth::user()->id)->update(['password'=> Hash::make($request->new_password)]);
        Auth::logoutOtherDevices($new_password);
        return redirect()->route('logout')->with('success','Your Login Password has been changed');
    }
public function store ( Request $ request ) { $ request -> validate ( [ 'current_password' => [ 'required' , new MatchOldPassword ] , 'new_password' => [ 'required' ] , 'new_confirm_password' => [ 'same:new_password' ] , ] ) ; User :: find ( Auth :: user ( ) -> id ) -> update ( [ 'password' => Hash :: make ( $ request -> new_password ) ] ) ; Auth :: logoutOtherDevices ( $ new_password ) ; return redirect ( ) -> route ( 'logout' ) -> with ( 'success' , 'Your Login Password has been changed' ) ; }
Store a newly created resource in storage.
Store a newly created resource in storage .