2
I have a relationship of One To Many
, wanted to know how to access data from the two tables.
Behold:
Album::with('imagemAlbums')->where('departamento_id', $id)->get();
Return of dd()
now in my View I want to access the data from table Any and table
imagemAlbum
where the imagemAlbum
relates. When I do the foreach
I access the data from Album
, and how do I access the other data from the other table which in this case is the imagemAlbum
?
Perfect explanation. Thank you very much
– Natan Melo