{{-- Re-emits query-string parameters as hidden inputs. A sort control is its own form, so it has to carry every other filter forward or changing the sort silently clears the search. Nested keys (attr[year][min], amenities[]) have to survive that trip intact, which is why this recurses rather than flattening. --}} @foreach ($params as $key => $value) @php($name = ($prefix ?? '') === '' ? $key : $prefix.'['.$key.']') @if (is_array($value)) @include('public.partials.query-inputs', ['params' => $value, 'prefix' => $name]) @elseif ($value !== null && $value !== '') @endif @endforeach