Lazer\Classes\Core_Database::withPending PHP Method

withPending() protected method

Pending function for with(), joining other tables to current
protected withPending ( )
    protected function withPending()
    {
        $joins = $this->pending['with'];
        foreach ($joins as $join) {
            $local = count($join) > 1 ? array_slice($join, -2, 1)[0] : $this->name;
            $foreign = end($join);
            $relation = Relation::table($local)->with($foreign);
            $data = $this->data;
            foreach ($join as $part) {
                $data = $relation->build($data, $part);
            }
        }
    }