Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

kylym1631's avatar

hasMany via hasMany

I want to define a relationship in the Branch model that allows me to access all Meal models associated with a branch through categories and other way. How can I do it?

Laravel and Filament 3: Models: Branch, Category, Meal

I have two pivot tables:

  • branch_category (columns: branch_id, category_id)
  • category_meal (columns: category_id, meal_id)
0 likes
2 replies

Please or to participate in this conversation.