dongqiongjiong4740 2014-07-30 13:50 采纳率: 0%
浏览 323

Laravel中hasManyThrough的逆向关系

Which is the inverse relation of hasManyThrough in Laravel?

es A->B->C

in class A:
return $this->hasManyThrough('C','B');

in class C:
which is the relation to return A objects?

thank you

  • 写回答

1条回答 默认 最新

  • dtxpz8785 2019-07-29 14:16
    关注

    Not sure if it really exists the literal "belongsToManyThrough" as i tried it and i am using Laravel 5.8. It didn't work. The best thing still would be C->B->A->property

    评论

报告相同问题?