nebulapackage / nebula

Nebula is a minimalistic and easy to use administration tool for Laravel applications, made with Laravel, Alpine.js, and Tailwind CSS.
https://nebulapackage.com
227 stars 27 forks source link

indexQuery method includes softDeleted models. #24

Open gregorip02 opened 3 years ago

gregorip02 commented 3 years ago

It is a good idea to exclude global scopes to increase query performance, but there is a problem when models are softDeleted because they keep showing up in the indexQuery.

We can solve it by overwriting this method in our resource, but it should ignore the softDeleted models by default.

Larsklopstra commented 3 years ago

I'm not a fan of soft deletes but I guess we could support this

Larsklopstra commented 3 years ago

Perhaps a more flexible filter with "Includes trashed"

ryangjchandler commented 3 years ago

Perhaps a more flexible filter with "Includes trashed"

I'd go down this route of providing a filter for including trashed / deleted items.

gregorip02 commented 3 years ago

Perhaps a more flexible filter with "Includes trashed"

Awesome, this will work.