Support the ongoing development of →
Eloquent Queues
Last updated by @valeno12 1 month ago.

Hi @valeno12

You need to also specifiy the key from the relationship table so that the join operation that is performed by the Eloquent internally fetches the correct data.

Here is the revised code

$resultados = UaderArea::with('lugares:lugar,cod_lugar')

I hope this resolves your issue. Thanks


Sign in to participate in this thread!


Your banner here too?


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

Your logo here?

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

© 2024 - All rights reserved.