Sorry for creating new issue but this question seems has not been asked before.
How can I search several models based on their relationships?
Let me describe:
I have 3 models venues,locations,cuisines.
a Venue has one Location and a location Belongs to a venue.
a venue has many cuisines and a cuisine belongs to many venues.
So what I want to do is call Venue::search() and it searches for:
venue.name , location.address, cuisine.name
in other words it searches related models in columns I specify.
Is that possible? tnx.
Sorry for creating new issue but this question seems has not been asked before. How can I search several models based on their relationships?
Let me describe: I have 3 models venues,locations,cuisines. a Venue has one Location and a location Belongs to a venue. a venue has many cuisines and a cuisine belongs to many venues. So what I want to do is call
Venue::search()
and it searches for:venue.name , location.address, cuisine.name
in other words it searches related models in columns I specify. Is that possible? tnx.