Please read carefully. I have a vehicle listing page with filters. I have created a scope for applying some filters to the vehicles listing. The scope function has eloquent whereHas method. But it has serious performance issues while executing query because I see each whereHas is converted to subqueries. I need you to convert the whereHas to Joins.
See my function here
[url removed, login to view]
Only experts may apply after going through code. Will not be paying for half work, need to convert all whereHas to join for increased performance.