public function existstUserCountryCodeAndPhoneNumber($userId) {
        $countryCode = DB::table('users')
            ->where('id', '=', $userId)
            ->value('phone_country_code')
        ;

        $phoneNumber =  DB::table('users')
            ->where('id', '=', $userId)
            ->value('phone_number')
        ;

        if ((!$countryCode) || (!$phoneNumber)) {
            return false;
        }

        return true;
    }
public function existstUserCountryCodeAndPhoneNumber($userId) {
        $countryCode = DB::table('users')
            ->where('id', '=', $userId)
            ->value('phone_country_code')
        ;

        $phoneNumber =  DB::table('users')
            ->where('id', '=', $userId)
            ->value('phone_number')
        ;

        if ((!$countryCode) || (!$phoneNumber)) {
            return false;
        }

        return true;
    }
public function existstUserCountryCodeAndPhoneNumber ( $ userId ) { $ countryCode = DB :: table ( 'users' ) -> where ( 'id' , '=' , $ userId ) -> value ( 'phone_country_code' ) ; $ phoneNumber = DB :: table ( 'users' ) -> where ( 'id' , '=' , $ userId ) -> value ( 'phone_number' ) ; if ( ( ! $ countryCode ) || ( ! $ phoneNumber ) ) { return false ; } return true ; }
Does the user have a country code and phone number for 2FA?

@param  int    $userId          User ID
Does the user have a country code and phone number for 2FA?