mokhosh / filament-kanban

Add kanban boards to your Filament pages
https://filamentphp.com/plugins/mokhosh-kanban
MIT License
228 stars 32 forks source link

Add getEloquentQuery in queries #19

Closed aislandener closed 4 months ago

aislandener commented 4 months ago

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 commented 4 months ago

Looks good.

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

mokhosh commented 4 months ago

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 commented 4 months ago

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.