How to bidirectional search belongsToMany


For example: if I have user id 1 then result is 3,5.



Make a model/table class for the table Friends with with 2 belongs to relationships to the Users table. Query Friends with an or statement.


yes have two relations lefFriends ,rightFriends in Friends table


I found a solution after query. But is it possible with single query.