protected function resolveQueryConstraint(string $identifier)
    {
        if (! method_exists($this, $method = 'load' . ucfirst(camel_case($identifier)))) {
            return null;
        }

        return function ($query) use ($method) {
            return $this->$method($query);
        };
    }