src/Factory.php
protected function parseBuilder($builder)
    {
        if ($builder instanceof EloquentBuilder) {
            return $this->createHandler($builder->getQuery(), $builder);
        }
        if (is_subclass_of($builder, Model::class)) {
            return $this->createHandler($builder->getQuery(), $builder->newQuery());
        }
        if ($builder instanceof QueryBuilder) {
            return $this->createHandler($builder, $builder);
        }
    }
protected function parseBuilder($builder)
    {
        if ($builder instanceof EloquentBuilder) {
            return $this->createHandler($builder->getQuery(), $builder);
        }
        if (is_subclass_of($builder, Model::class)) {
            return $this->createHandler($builder->getQuery(), $builder->newQuery());
        }
        if ($builder instanceof QueryBuilder) {
            return $this->createHandler($builder, $builder);
        }
    }
protected function parseBuilder ( $ builder ) { if ( $ builder instanceof EloquentBuilder ) { return $ this -> createHandler ( $ builder -> getQuery ( ) , $ builder ) ; } if ( is_subclass_of ( $ builder , Model :: class ) ) { return $ this -> createHandler ( $ builder -> getQuery ( ) , $ builder -> newQuery ( ) ) ; } if ( $ builder instanceof QueryBuilder ) { return $ this -> createHandler ( $ builder , $ builder ) ; } }
Parse the builder.

@param mixed $builder
Parse the builder .