5 months ago

Problems returning results from a many-to-many relation with Laravel and Mongodb

Posted 5 months ago by Godlove

Greetings all, Please an new with mongodb and laravel and i want to implement a man-to-many relation. I have Student Model and Subject model, I want that many students can take a single subject and a single subject can be taken by many students. I created a pivot table called student_subjects table containing both student_id and subject_id as foreign keys and later realized that mongodb does not support pivot tables and now I am stock on the way forward with this. Thanks for the help in advance. GODLOVE.

Please sign in or create an account to participate in this conversation.