menu

Questions & Answers

Laravel Query can not find posts with ingredients with pivot table

I have a problem with the search bar. I have recipes in one table and the products in those recipes are in another table. There is a Pivot Table between them and when I add or edit it works fine but the search does not work for me by the name of the product (but by the title or content of the recipe it searches for me) and throws me an error. Below gives table models, migrations and controllers. Anyone have an idea why it's not working properly? I've run out of ideas

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

Help with solving of this issue

Comments:
2023-01-23 23:30:06
Please do not upload pictures of error messages and code. Add all of the relevant information to your post instead.
Answers(0) :