Skip to content
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 getEloquentQuery in queries #19

Merged
merged 5 commits into from
Mar 7, 2024
Merged

Add getEloquentQuery in queries #19

merged 5 commits into from
Mar 7, 2024

Conversation

aislandener
Copy link
Contributor

I'm sending this pull request because I believe we failed to declare getEloquentQuery in the classes, as we generally want to reuse the same queries over and over again. And repeating it over and over is kind of boring.

I defaulted to Filament to use the same function used in its other features.

I'll be here if you need further explanation

@mokhosh
Copy link
Owner

mokhosh commented Mar 7, 2024

Looks good.

Can you tell me about the real world issue that you tried to solve with this PR?

@mokhosh
Copy link
Owner

mokhosh commented Mar 7, 2024

I'm curious because the only place where it should make an actual change is in records which you can customize once, but in other places you're dealing with specific ids which are way more specific than your query so it shouldn't have any practical effect.
Am I missing something?

@aislandener
Copy link
Contributor Author

So, even though we are dealing with ids, when there is a restrictive rule, such as SoftDeleteScope, it does not bring the id because the id needs to comply with these rules.

Then I based myself on the Filament Resources, which has this specific function to remove some GlobalScopes that are in the models.

@mokhosh mokhosh merged commit dfa610b into mokhosh:main Mar 7, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants