src/Http/Controllers/Tenantarea/PasswordResetController.php
public function process(PasswordResetPostProcessRequest $request)
    {
        $result = app('auth.password')
            ->broker($this->getPasswordResetBroker())
            ->reset($request->only(['email', 'expiration', 'token', 'password', 'password_confirmation']), function ($user, $password) {
                $user->fill([
                    'password' => $password,
                    'remember_token' => str_random(60),
                ])->forceSave();
            });

        switch ($result) {
            case PasswordResetBrokerContract::PASSWORD_RESET:
                return intend([
                    'url' => route('tenantarea.login'),
                    'with' => ['success' => trans($result)],
                ]);

            case PasswordResetBrokerContract::INVALID_USER:
            case PasswordResetBrokerContract::INVALID_TOKEN:
            case PasswordResetBrokerContract::EXPIRED_TOKEN:
            case PasswordResetBrokerContract::INVALID_PASSWORD:
            default:
                return intend([
                    'back' => true,
                    'withInput' => $request->only(['email']),
                    'withErrors' => ['email' => trans($result)],
                ]);
        }
    }
public function process(PasswordResetPostProcessRequest $request)
    {
        $result = app('auth.password')
            ->broker($this->getPasswordResetBroker())
            ->reset($request->only(['email', 'expiration', 'token', 'password', 'password_confirmation']), function ($user, $password) {
                $user->fill([
                    'password' => $password,
                    'remember_token' => str_random(60),
                ])->forceSave();
            });

        switch ($result) {
            case PasswordResetBrokerContract::PASSWORD_RESET:
                return intend([
                    'url' => route('tenantarea.login'),
                    'with' => ['success' => trans($result)],
                ]);

            case PasswordResetBrokerContract::INVALID_USER:
            case PasswordResetBrokerContract::INVALID_TOKEN:
            case PasswordResetBrokerContract::EXPIRED_TOKEN:
            case PasswordResetBrokerContract::INVALID_PASSWORD:
            default:
                return intend([
                    'back' => true,
                    'withInput' => $request->only(['email']),
                    'withErrors' => ['email' => trans($result)],
                ]);
        }
    }
public function process ( PasswordResetPostProcessRequest $ request ) { $ result = app ( 'auth.password' ) -> broker ( $ this -> getPasswordResetBroker ( ) ) -> reset ( $ request -> only ( [ 'email' , 'expiration' , 'token' , 'password' , 'password_confirmation' ] ) , function ( $ user , $ password ) { $ user -> fill ( [ 'password' => $ password , 'remember_token' => str_random ( 60 ) , ] ) -> forceSave ( ) ; } ) ; switch ( $ result ) { case PasswordResetBrokerContract :: PASSWORD_RESET : return intend ( [ 'url' => route ( 'tenantarea.login' ) , 'with' => [ 'success' => trans ( $ result ) ] , ] ) ; case PasswordResetBrokerContract :: INVALID_USER : case PasswordResetBrokerContract :: INVALID_TOKEN : case PasswordResetBrokerContract :: EXPIRED_TOKEN : case PasswordResetBrokerContract :: INVALID_PASSWORD : default : return intend ( [ 'back' => true , 'withInput' => $ request -> only ( [ 'email' ] ) , 'withErrors' => [ 'email' => trans ( $ result ) ] , ] ) ; } }
Process the password reset form.

@param \Cortex\Auth\B2B2C2\Http\Requests\Tenantarea\PasswordResetPostProcessRequest $request

@return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse
Process the password reset form .