I have Users, Courses models with many-to-many relationship.
the pivot is the default one which contains:
id, user_id, course_id
my query is this: