laravel-nestedset
laravel-nestedset copied to clipboard
Callback parameter when checking or fixing the tree
I've added an optional callback to fixTree() countErrors() and relative methods so a user can configure the query
My main use case i to disable global scopes (I've added tests for this use case)
usage
Category::fixTree(function($query){
$query->withoutGlobalScopes([AnUnwantedScope::class]);
});
Category::isBroken(function($query){
$query->withoutGlobalScopes([AnUnwantedScope::class]);
});