So they routed them by Allah 's leave and David slew Goliath ; and Allah gave him the kingdom and wisdom , and taught him of that which He willeth . And if Allah had not repelled some men by others the earth would have been corrupted .