I have a relationship of One To Many
, I wanted to know how do I access data from the two tables.
See:
Album::with('imagemAlbums')->where('departamento_id', $id)->get();
Return from dd()
Now in my View I want to access the data from the table Some and the table
imagemAlbum
where imagemAlbum
is related. When I do foreach
I access the data from Album
, and how do I access the other data from the other table which in this case is imagemAlbum
?