Support the ongoing development of Laravel.io →
Eloquent
Last updated 2 years ago.
0

Why not put all your users in the same table?

0

Yes It, wold be a good Idea . I managed making with Polymorphic Relation , with a Pivot Table called message_student .

In that Table , I did 4 colum , the - model_send_message , send_id , model_ received_message , received_id . And I did a Polymorphic Relation in the - model_send_message and in the received_message .

2 Polymorphic Relation at the same table . I dont know that wold be a good practice . but is working .

Thanks

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.