I use the filtering offered by JeffreyWay https://github.com/laracasts/Dedicated-Query-String-Filtering

Everything works fine, but I don’t even know how to properly organize links to filters.
For example, there is a filter with manufacturers, I make links like this {{ url(Request::url() . '?brand=1') }} URL is obtained ( http://site.app/cat/laptops?brand=1 )
When you click everything works. But if I click on the second filter, for example, " is on sale, " then the results are displayed with the goods that are on sale, and the results with the manufacturers disappear. The question is, how can you stick 2-5 filters to each other?
That is, like this: brand=1&in_stock=true&price=300' Maybe you can do something on jquery?

    1 answer 1

    The function Request::fullUrlWithQuery() appeared in laravel 5.2.22

    If you need to add parameters to the current value of the url then you can now take the current query and add an array to it. Example: your current URL is site.com/catalog and you want a new URL, site.com/catalog?category=1&order=price:

    $request->fullUrlWithQuery(['category' => '1', 'order' => 'price']);
    It also works on adding to existing parameters.