jeudi 14 juillet 2016

Multiple tables with one to many relationship(Laravel)

I have 3 tables namely A, B and C. All 3 of them need to make use of a notes table(i.e. A has many notes and a note belongs to A. The same follows for remaining 2 tables).
So I created 3 more tables: A_note, B_note and C_note(as mentioned here: multiple tables need one to many relationship).

Is there a way to do CRUD operations on these tables(A_note, B_note and C_note) similar to the way we handle pivot table in many-to-many relationship?

Please suggest a way forward.

Aucun commentaire:

Enregistrer un commentaire