public static function resolveScope($name, $args=null, $cls=null)
    {
        $conditions = self::getScope($name, $cls);
        if (!$conditions) {
            return null;
        }

        if (is_callable($conditions)) {
            $conditions = $conditions($args);
        }
        return self::where($conditions);
    }