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

Fajar's avatar
Level 2

get data schedule

hey, I'm having some confusion..to pull data with the conditions I asked for like this

when a user with the teacher role logs in he can see the schedule according to the field he teaches

for my database schema

schedules

-> lesson_id
->user_id
->room_id

rooms

->user_id

teachers

->user_id

for roles I use a packages, namely easy roles and permissions in laravel

0 likes
1 reply
neilstee's avatar

@fajar your schedules table has user_id on it? Isn't that enough to pull the schedules?

Please or to participate in this conversation.