title: How to skip a relationship and use other relationship based on where clause in a query using same query data in laravel 8
body: <p>I want to use if else in a query but using the data of this query using where clause</p>