Support the ongoing development of Laravel.io →
Database Eloquent
Last updated 2 years ago.
0

Hi,

dump the queries sent to your databse. I think the pivot content is fetched together with the reation when you do Doctor::with(['clinics'])

0

@Firtzberg is correct. When you use with() it makes the content of the pivot available in the result set.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

deller21 deller21 Joined 31 Aug 2016

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.