Illuminate\Database\Query\Builder::restoreFieldsForCount PHP Method

restoreFieldsForCount() protected method

Restore some fields after the pagination count.
protected restoreFieldsForCount ( ) : void
return void
    protected function restoreFieldsForCount()
    {
        foreach (['orders', 'limit', 'offset', 'columns'] as $field) {
            $this->{$field} = $this->backups[$field];
        }
        foreach (['order', 'select'] as $key) {
            $this->bindings[$key] = $this->bindingBackups[$key];
        }
        $this->backups = [];
        $this->bindingBackups = [];
    }