protected function hasVersionJoin(Builder $builder, string $table)
    {
        return collect($builder->getQuery()->joins)->pluck('table')->contains($table);
    }
protected function hasVersionJoin(Builder $builder, string $table)
    {
        return collect($builder->getQuery()->joins)->pluck('table')->contains($table);
    }
protected function hasVersionJoin ( Builder $ builder , string $ table ) { return collect ( $ builder -> getQuery ( ) -> joins ) -> pluck ( 'table' ) -> contains ( $ table ) ; }
Determine if the given builder contains a join with the given table

@param Builder $builder
@param string $table
@return bool
Determine if the given builder contains a join with the given table