Skip to content
Advertisement

Laravel multiple filter with search

I want to search service providers and products, and filter by location and by service, or by location and by-products. i am using below code` $results = new ClientProfile;

JavaScript

although it shows URL as domain.com/results?product=2&city=78 it shows all products without filter by city

Advertisement

Answer

You use if elseif therefore it when finding one, in the second also does not come.

use when instead if else

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement