lazychaser / laravel-nestedset

Effective tree structures in Laravel 4-8
3.64k stars 473 forks source link

Is it possible to move QueryBuilder logic to trait? To support custom Builders #583

Open ievgenklymenko opened 1 year ago

ievgenklymenko commented 1 year ago

Hi!

The practic of extending builder through newEloquentBuilder is becoming more and more common. Package owners and project devs - everybody wants to use their own builders.

But since this package uses full custom QueryBuilder class, it is hard to combine with other custom builders. If we had all builder logic inside a trait instead, this would save the day.

It sound like not hard to do - neither does it ruin backward compatibility - unless I'm missing something. There was this old request showing how it can be done (but it is stale now): https://github.com/lazychaser/laravel-nestedset/pull/229