public static function hasName( $name, $module_id = null ): bool
	{
		if( !self::isValidName($name) )
		{
			return false;
		}

		$builder = \DB::table("events")->where("name", $name);
		if( is_numeric($module_id) )
		{
			$builder->where("module_id", (int) $module_id );
		}

		return $builder->count(["id"]) > 0;
	}
public static function hasName( $name, $module_id = null ): bool
	{
		if( !self::isValidName($name) )
		{
			return false;
		}

		$builder = \DB::table("events")->where("name", $name);
		if( is_numeric($module_id) )
		{
			$builder->where("module_id", (int) $module_id );
		}

		return $builder->count(["id"]) > 0;
	}
public static function hasName ( $ name , $ module_id = null ) : bool { if ( ! self :: isValidName ( $ name ) ) { return false ; } $ builder = \ DB :: table ( "events" ) -> where ( "name" , $ name ) ; if ( is_numeric ( $ module_id ) ) { $ builder -> where ( "module_id" , ( int ) $ module_id ) ; } return $ builder -> count ( [ "id" ] ) > 0 ; }
Config name is exists

@param string $name
@param null | int $module_id
@return bool
Config name is exists