Let’s say I have the following tables in my database (also converted to Models):
Table Name: items
Attributes:
item_id (Unique, auto increment)
name
price
Table Name: item_attributes
Attributes:
item_attribute_id (Unique, auto increment)
item_id (Foreign Key to items.item_id)
name
value
I know each individual model has a search function, however I would like to be able to search for an item and have the system search return the item if it matches a field in the "item" table/model OR the "item_attributes" table/model for that item.
I’ve searched around a bit and haven’t really found a solution. Has anyone done this?