阅读背景:

阐明如何在Laravel的Eloquent ORM中建立一对多的关系

来源:互联网 

Okay, I'm working through the Laravel 4 docs to setup a one-to-many relationship between two models. Obviously, one side should use hasMany(). But for the other side, should I use hasOne or belongsTo? Does it matter? What's difference? Why do both exist?Okay, I'm working through the Laravel 4 docs to




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: