app/Http/Controllers/Auth/LoginController.php
/**
     * Get the login username to be used by the controller.
     *
     * @return string
     */
Get the login username to be used by the controller.
@return string
Get the login username to be used by the controller . @return string
public function username()
    {
        $login = request()->input('data');
        $field = filter_var($login, FILTER_VALIDATE_EMAIL) ? 'email' : 'username';
        request()->merge([
            $field => $login,
        ]);
        return $field;
    }
public function username ( ) { $ login = request ( ) -> input ( 'data' ) ; $ field = filter_var ( $ login , FILTER_VALIDATE_EMAIL ) ? 'email' : 'username' ; request ( ) -> merge ( [ $ field => $ login , ] ) ; return $ field ; }
Get the login username to be used by the controller.
Get the login username to be used by the controller .