Filter results with ajax and modify URL

I’m trying to build a filter feature for a website I am currently building in Laravel, that will enable the customer to filter a product down by it’s attributes.

At the moment, the URL to filter products is /filter?size=1,2,3&construction=102,204&brand=4,37.

What I’d like to be able to do, is change the URL based on chosen filters and refresh the results without re-loading the page.

An example of what I’m trying to achieve is AO.com’s filtering: http://ao.com/l/washing_machines-free_standing/1-9/1/#!/washing_machines-bosch-free_standing-priced_350_to_450-7kgandmore/1-6-9-23-39/1/

I’ve searched a lot on the internet to try and find the best way to go about it, but I can’t seem to find a definitive method.

If anyone can point me in the right direction, that’ll be great.


Source: laravel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.