app/Http/Controllers/Auth/LoginController.php
/**
     * Get the failed login response instance.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\RedirectResponse
     */
Get the failed login response instance.
Get the failed login response instance .
protected function sendFailedLoginResponse(Request $request)
    {
        $errors = [
            $this->username() => trans('auth.failed')
        ];
        $user = User::where($this->username(), $request->{$this->username()})->first();
        if ($user && Hash::check($request->password, $user->password) && $user->status != 1) {
            $errors = [$this->username() => 'Your account is blocked.'];
        }
        if ($request->expectsJson()) {
            return response()->json($errors, 422);
        }
        return redirect()->back()
            ->withInput($request->only($this->username(), 'remember'))
            ->withErrors($errors);
    }
protected function sendFailedLoginResponse ( Request $ request ) { $ errors = [ $ this -> username ( ) => trans ( 'auth.failed' ) ] ; $ user = User :: where ( $ this -> username ( ) , $ request -> { $ this -> username ( ) } ) -> first ( ) ; if ( $ user && Hash :: check ( $ request -> password , $ user -> password ) && $ user -> status != 1 ) { $ errors = [ $ this -> username ( ) => 'Your account is blocked.' ] ; } if ( $ request -> expectsJson ( ) ) { return response ( ) -> json ( $ errors , 422 ) ; } return redirect ( ) -> back ( ) -> withInput ( $ request -> only ( $ this -> username ( ) , 'remember' ) ) -> withErrors ( $ errors ) ; }
Get the failed login response instance.
Get the failed login response instance .