-
Notifications
You must be signed in to change notification settings - Fork 915
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
withoutGlobalScopes does not work in setupShowOperation #4935
Comments
Hello @AlexKomMsk We had for years documented the usage of We shouldn't have done it in the first place, we have the You should be able to solve your issue with However I can confirm there is an issue with show operation, since it uses a different approach than ListOperation. (But they should use the same, I agree). I am working on a fix (actually I had this fixed in a PR not related to showOperation), so I will just split that bit out of that PR and create a new one, only to address this issue. Cheers |
Pedro, perhaps you can offload this to Jorge and Karan? Their mission is to fix as many small things they can in 5.4 now. |
It seems to me that it is better to turn off global scopes in the config. Global scopes in the admin panel are almost always unnecessary and get in the way. |
Bug report
What I did
open setupShowOperation
make
$this->crud->query = $this->crud->query->withoutGlobalScopes();
and i get 404 error.
It works in setupListOperation.
What I expected to happen
I want to get a model in the admin without soft-deleted and without global scopes.
What happened
404
Backpack, Laravel, PHP, DB version
When I run
php artisan backpack:version
the output is:LARAVEL VERSION:
v9.52.0@eb85cd9d72e5bfa54b4d0d9040786f26d6184a9e
BACKPACK PACKAGE VERSIONS:
backpack/crud: 5.5.0
backpack/generators: 3.3.14
The text was updated successfully, but these errors were encountered: