I highly suggest you watch some of the laracast before you proceed any further. another good tutorial is this ==https://scotch.io/tutorials/a-guide-to-using-eloquent-orm-in-laravel
jimgwhit said:
I highly suggest you watch some of the laracast before you proceed any further. another good tutorial is this ==https://scotch.io/tutorials/a-guide-to-using-eloquent-orm-in-laravel
Thank you for answer!
I have read this link.
I konw how to use one-to-one ,one-to-many and one-to-many.
About This question I connect A and B by primary key, but add D and not use primary key.I try to do it by hasManyThrough, but must use primary key.
example:
table event(id, name), eventInfo(id, event_id, user_id, ......), user(id, name), userInfo(id, user_id, ......).
I want to get some data from userInfo by select event, but just have uer_id at eventInfo.
what method can do it?
I still think you need a foreign key but please read and study this post real good. http://laravel.io/forum/05-12-2015-has-many-through-relationship-depth
jimgwhit said:
I still think you need a foreign key but please read and study this post real good. http://laravel.io/forum/05-12-2015-has-many-through-relationship-depth
hi jimgwhit :
Thank you for help .
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community