-
Notifications
You must be signed in to change notification settings - Fork 232
Add support for withoutGlobalScopes #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for withoutGlobalScopes #424
Conversation
@gitwilliam Thank you so much for all the work you put into this! I will review and merge by the end of this weekend and release a new version if everything is working. :)
@gitwilliam Thank you so much for all the work you put into this! I will review and merge by the end of this weekend and release a new version if everything is working. :)
Thanks for looking at it @mikebronner. I fully admit that there are still a lot of things about the library that I don't understand. So feel free to send me off to correct anything you think is not in keeping with design or intention.
The intention of this PR is to add in support for the
withoutGlobalScope
andwithoutGlobalScopes
function in Eloquent (https://laravel.com/docs/8.x/eloquent#removing-global-scopes).When an application using the Caching Library applies the
withoutGlobalScopes()
modifier to a model, the global scopes are currently being added back in by the Caching Library. This requires the client application to disable the cache,disableCache()
, prior to callingwithoutGlobalScopes
. This PR should fix that.