spatie / laravel-query-builder

Easily build Eloquent queries from API requests
https://spatie.be/docs/laravel-query-builder
MIT License
4k stars 392 forks source link

add option disable_invalid_includes_query_exception #906

Closed dimzeta closed 7 months ago

dimzeta commented 9 months ago

By default when we add a non desired include, we automatically have an InvalidIncludeQuery. The option disable_invalid_includes_query_exception allow us to disable it.

When this option is enabled, we remove the non included relationship and having only allowed relationships.

siarheipashkevich commented 8 months ago

@AlexVanderbist please take a look at this PR

AlexVanderbist commented 7 months ago

Awesome, thanks! (Sorry for the delay)