diff --git a/app/Nova/Captain.php b/app/Nova/Captain.php index 8e0030c7..7b97f03e 100755 --- a/app/Nova/Captain.php +++ b/app/Nova/Captain.php @@ -64,7 +64,8 @@ public function fields(NovaRequest $request): array ]; }) ->prunable() - ->searchable(uses_searchable()), + ->searchable(uses_searchable()) + ->displaysWithTrashed(! uses_without_trashed()), ]; } diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 049e56b8..573a4b73 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -28,6 +28,7 @@ public function register() $this->app->instance('uses_inline_create', file_exists(base_path('.inline-create'))); $this->app->instance('uses_with_reordering', ! file_exists(base_path('.disable-reordering'))); $this->app->instance('uses_breadcrumbs', ! file_exists(base_path('.disable-breadcrumbs'))); + $this->app->instance('uses_without_trashed', file_exists(base_path('.without-trashed'))); } /** diff --git a/bootstrap/helpers.php b/bootstrap/helpers.php index 1185f36a..26de5a0f 100644 --- a/bootstrap/helpers.php +++ b/bootstrap/helpers.php @@ -21,3 +21,8 @@ function uses_without_reordering() { return ! app('uses_with_reordering'); } + +function uses_without_trashed() +{ + return app('uses_without_trashed'); +}