staudenmeir / belongs-to-through

Laravel Eloquent BelongsToThrough relationships
MIT License
1.15k stars 88 forks source link

hasMany to belongsTo #48

Closed alasdairgallacher closed 4 years ago

alasdairgallacher commented 4 years ago

Hi

How would you go about this scenario: Business → has many → AttachedServices → belongs to → service

Trying to use both of your packages, but struggling.

Thanks!

staudenmeir commented 4 years ago

This looks like a native BelongsToMany relationship, have you tried that? https://laravel.com/docs/7.x/eloquent-relationships#many-to-many

alasdairgallacher commented 4 years ago

That worked, thank you!

I was over complicating it I guess haha!