Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

mohamedhelmy's avatar

Many to many validation with several columns

I have 3 tables Users - courses - user_courses ( many to many relationship) User [ id ] Course [ day - time - start_date - end_date ] User_Course [user_id - course_id ]

I eant to validate that user can't enroll to two courses in same day and time and period from start_date to end_date This for api I receive course_id in request and i have logged user id Any help ! Thx

0 likes
0 replies

Please or to participate in this conversation.