I have a table that looks lie:
The table serves as a reference table between two tables. The kicker is that the second table this reference table serves depends on the value of member_type
.
There are three tables being connected using the above table: incidents
, user_member_incidents
, and server_member_incidents
. The member_id
column in the reference table references either the user_member_incidents
table or the server_member_incidents
table. This is determined by the value of the member_type
column.
How would I reflect this relationship using a belongsToMany
method in Eloquent?
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2f5Ixn3
via IFTTT
Aucun commentaire:
Enregistrer un commentaire