protected function prepareQueryBuilder($columns = ['*'])
    {
        $builder = $this->query->applyScopes();

        return $builder->addSelect(
            $this->shouldSelect($builder->getQuery()->columns ? [] : $columns)
        );
    }
protected function prepareQueryBuilder($columns = ['*'])
    {
        $builder = $this->query->applyScopes();

        return $builder->addSelect(
            $this->shouldSelect($builder->getQuery()->columns ? [] : $columns)
        );
    }
protected function prepareQueryBuilder ( $ columns = [ '*' ] ) { $ builder = $ this -> query -> applyScopes ( ) ; return $ builder -> addSelect ( $ this -> shouldSelect ( $ builder -> getQuery ( ) -> columns ? [ ] : $ columns ) ) ; }
Prepare the query builder for query execution.

@param  array  $columns
@return \Illuminate\Database\Eloquent\Builder
Prepare the query builder for query execution .