I think this package doesn't consider Model::automaticallyEagerLoadRelationships().
This code throws LazyLoadingViolationException if Model::preventLazyLoading() is enabled:
Model::automaticallyEagerLoadRelationships();
Model::preventLazyLoading();
$services = Service::query()
->orderBy("name", "ASC")
->get();
foreach ($services as $service){
$service->children;
}
But relationship should load automatically.
If I call withRelationshipAutoloading on Collection then it works normal:
Model::preventLazyLoading();
$services = Service::query()
->orderBy("name", "ASC")
->get()
->withRelationshipAutoloading();
foreach ($services as $service){
$service->children;
}