Level 54
@ivanradojevic your result is functionally the same as your 'wanted' version, but is just url encoded.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
How to make on frontend query string for Spatie query builder?
@foreach(\App\Product::get()->pluck("name") as $value => $name)
<a href="{{ route('products.index', ['filter[name]'=>$name ]) }}" >{{$name}}</a>
@endforeach
Result is this:
http://test.test/products?filter%5Bname%5D=armani
wanted :
http://test.test/products?filter[name]=armani
@ivanradojevic your result is functionally the same as your 'wanted' version, but is just url encoded.
Please or to participate in this conversation.