private function getCount($column)
    {
        $alias = 'count';

        // Save initial state
        $original = clone $this->queryBuilder;
        $bindings = $this->bindings;

        // Set guessed query and execute it
        $this->queryBuilder->setQueryString($this->queryBuilder->guessCountQuery($column, $alias));
        $count = $this->query($alias);

        // And finally restore initial state
        $this->queryBuilder = $original;
        $this->bindings = $bindings;

        return $count;
    }
private function getCount($column)
    {
        $alias = 'count';

        // Save initial state
        $original = clone $this->queryBuilder;
        $bindings = $this->bindings;

        // Set guessed query and execute it
        $this->queryBuilder->setQueryString($this->queryBuilder->guessCountQuery($column, $alias));
        $count = $this->query($alias);

        // And finally restore initial state
        $this->queryBuilder = $original;
        $this->bindings = $bindings;

        return $count;
    }
private function getCount ( $ column ) { $ alias = 'count' ; // Save initial state $ original = clone $ this -> queryBuilder ; $ bindings = $ this -> bindings ; // Set guessed query and execute it $ this -> queryBuilder -> setQueryString ( $ this -> queryBuilder -> guessCountQuery ( $ column , $ alias ) ) ; $ count = $ this -> query ( $ alias ) ; // And finally restore initial state $ this -> queryBuilder = $ original ; $ this -> bindings = $ bindings ; return $ count ; }
Returns count for pagination
This is the implementation of Memento pattern

@param string $column Column to be selected when counting
@return integer
Returns count for pagination This is the implementation of Memento pattern