Add a nested post field to the query.

@param  \Closure $callback
@return \Kevindierkx\Elicit\Query\Builder|static
518480
public function postFieldNested(Closure $callback)
    {
        // To handle nested post fields we'll actually create a brand new query instance
        // and pass it off to the Closure that we have. The Closure can simply do
        // do whatever it wants to a post field then we will store it for compiling.
        $query = $this->newQuery();

        call_user_func($callback, $query);

        return $this->addNestedPostFieldQuery($query);
    }
1282314
public function setConstraint(Closure $callback)
    {
        $this->data            = [];
        $this->loaded          = false;
        $this->queryConstraint = $callback;

        return $this;
    }
896372
public function extend($driver, Closure $callback)
    {
        $this->factory->extend($driver, $callback);

        return $this;
    }
223809
public function extend(Closure $callback)
    {
        $instance = $this->retrieve();
        call_user_func($callback, $instance);

        return $instance;
    }
142436
public function then(\Closure $callback)
	{
		$response = $this->layers[0]->handle($this->request);

		return call_user_func($callback, $this->request, $response);
	}
757952
public function joinClosure(string $table, \Closure $callback): BaseQueryRelateContract
    {
        $this->query->join($table, $callback);

        return $this;
    }
744976
public function map(\Closure $callback) : Collection
    {
        $keys = array_keys($this->data);
        $values = array_map($callback, $this->data, $keys);

        return static::create(array_combine($keys, $values));
    }
657886
public function sortable(\Closure $callback = null)
    {
        return tap($this, function ($element) use ($callback) {
            app('scaffold.module')->addSortable(
                $element->id(),
                $callback
            );
        });
    }
1171438
public function nest(Closure $callback, $boolean = 'and')
	{
		$join = new static($this->type, $this->table);

		$callback($join);

		if (count($join->clauses)) {
			$nested = true;

			$this->clauses[] = compact('nested', 'join', 'boolean');
			$this->bindings = array_merge($this->bindings, $join->bindings);
		}

		return $this;
	}
339073
public function extend(Closure $callback = null)
    {
        !is_null($callback) && call_user_func($callback, $this->grid, $this->container->make('request'), $this->container->make('translator'));

        return $this;
    }
194171
public function department($name, Closure $callback)
    {
        $department = $this->createDepartment($name);

        call_user_func($callback, $department);

        if (is_null(static::$departments)) {
            static::$departments = Collection::make([]);
        }

        static::$departments->push($department);

        return $this;
    }
471744
public function addLogger(callable $callback)
    {
        if (!is_callable($callback)) {
            throw LoggerException::forInvalidCallback();
        }

        if ($callback instanceof Closure) {
            $callback = $callback->bindTo($this, get_class($this));
        }

        $this->loggers[] = $callback;

        return $this;
    }
291775
protected function buildQueueCallable($callback)
    {
        if (! $callback instanceof Closure && ! $callback instanceof Serializable) {
            return $callback;
        }

        return \serialize(new SerializableClosure($callback));
    }
1130100
public function filter(\Closure $callback = null) : Collection
    {
        if ($callback) {
            return static::create(array_filter($this->data, $callback));
        }

        return static::create(array_filter($this->data));
    }
427798
public function onCreateAndEdit(Closure $callback = null)
    {
        $this->onCreate($callback);
        $this->onEdit($callback);

        return $this;
    }
125439
public function each(Closure $callback) 
	{
		foreach( $this->attributes as $key => $value ) 
		{
			if( $callback($value, $key) === false ) {
				break;
			}
		}

		return $this;
	}
1048422
public function add(array $properties, Closure $callback = null)
    {
        $this->makeSubItem(null, $properties, $callback);
    }