Please help me make this query in eloquent. A business can have many categories.
Select b.* from businesses b inner join categorybusiness cb on b.id = cb.business_id inner join category c on cb.category_id = c.id where b.location like '%query1%' and b.location like '%query2%' and c.name like '%query3%' and c.name like '%query4%'.
my tables are.. businesses - contain the location column and a pivot table for category and business..
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community