mardi 23 mai 2017

How to query intermediate relationships in Laravel

I want to make a relationship queries on the three tables I have tblSchedule tblUserHomeCourt and tblHomeCourt

they have following structure

tblSchedules
->scheduleId
->userHomeCourtId
->timeFrom
->timeTo
->duration

tblUserHomeCourts
->userHomeCourtId
->userId
->homeCourtId

tblHomeCourts
->homeCourtId
->homeCourtName
->lat
->long and other details

Now, schedule will store the schedules of an user whereas userHomeCourts will store the current active homeCourt and homeCourt will provide the list of available homecourts.

how to fetch these details for a user?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2q5Qdi0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire