vendredi 28 juillet 2017

Laravel many to many relashionship

I have users, meetings, comments tables, I want users to be able to post comments on users profile and meetings, I know how to make one to many relationship for users and comments tables, but i want all comments to be saved in one table and show comments on users profile and meetings. tables structure:

users
id
name
comment_id

meetings
id
name

comments
id
user_id
comment



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire