protected function resolve($column, $key, $last, callable $callback)
    {
        if (! strpos($column, '.')) {
            return $callback("{$last}.{$column}", $key);
        }

        $scope = strstr($column, '.', true);
        $singular = str_singular($scope);
        $next = substr(strstr($column, '.'), 1);

        if (! in_array($scope, $this->loaded)) {
            $this->loaded[] = $scope;

            $this->builder->join($scope, "{$last}.{$singular}_id", "{$scope}.id");
        }

        return $this->resolve($next, $key, $scope, $callback);
    }