public function authentication(Request $request)
    {
        try {
            $this->authRepositoryInterface->authenticate($request->all());
        } catch (FormValidationException $e) {
            Flash::error($e->getMessage());

            return redirect()
              ->route('auth.login')
              ->withErrors($e->getErrors());
        } catch (AuthenticationException $e) {
            Flash::error($e->getMessage());

            return redirect()->route('auth.login');
        }

        return redirect()->route('dashboard.index');
    }
public function authentication(Request $request)
    {
        try {
            $this->authRepositoryInterface->authenticate($request->all());
        } catch (FormValidationException $e) {
            Flash::error($e->getMessage());

            return redirect()
              ->route('auth.login')
              ->withErrors($e->getErrors());
        } catch (AuthenticationException $e) {
            Flash::error($e->getMessage());

            return redirect()->route('auth.login');
        }

        return redirect()->route('dashboard.index');
    }
public function authentication ( Request $ request ) { try { $ this -> authRepositoryInterface -> authenticate ( $ request -> all ( ) ) ; } catch ( FormValidationException $ e ) { Flash :: error ( $ e -> getMessage ( ) ) ; return redirect ( ) -> route ( 'auth.login' ) -> withErrors ( $ e -> getErrors ( ) ) ; } catch ( AuthenticationException $ e ) { Flash :: error ( $ e -> getMessage ( ) ) ; return redirect ( ) -> route ( 'auth.login' ) ; } return redirect ( ) -> route ( 'dashboard.index' ) ; }
Authenticate and Validate login input.

@param Request $request

@return $this|\Illuminate\Http\RedirectResponse
Authenticate and Validate login input .