Skip to content

Commit

Permalink
Merge pull request #557 from Laravel-Backpack/add-non-trash-filter-docs
Browse files Browse the repository at this point in the history
add note about disabling trashed filter
  • Loading branch information
pxpm authored Mar 5, 2024
2 parents 1ce120b + f29d2e2 commit e24ee4c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 6.x/crud-operation-trash.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,13 @@ You can easily disable the default trash filter:
public function setupTrashOperation()
{
CRUD::setOperationSetting('withTrashFilter', false);

// one of the things the filter does is preventing the update/access to trashed items.
// if you disable it and use Update/Show operations, you should manually disable the
// access to those operations or they will throw 404:
CRUD::setAccessCondition(['update', 'show'], function($entry) {
return ! $entry->trashed();
});
}
```

Expand Down

0 comments on commit e24ee4c

Please sign in to comment.