protected function checkForTrashed(Builder $query, Request $request): Builder
    {
        if ($request->filled('trashed') && $request->input('trashed') === '1') {
            $query->onlyTrashed();
        }

        return $query;
    }