Hi.
First, the View::with takes 2 arguments, not three. So you would have to do like ->with('recording', $recording)->with('credits', $credits);
But i REALLY think that eloquent relationships is what you seek here. Read more at http://laravel.com/docs/eloquent#relationships
Thanks for the suggestion. I've looked at that page and I haven't been able to get relationships to work that way.
I'm assuming (based on this page) that this: return $this->hasOne('Phone'); needs a second class in the model since Phone is the name of a class. At least that's how I'm reading it. Is this correct?
Also, I don't understand how to display the results from credits.
So, to break it down, I've got:
Song Title [related songs_titles table] Recording Info [recording table]
Credit A [related credits table which is related to a names table and a roles table] Credit B [related credits table which is related to a names table and a roles table] Credit C [related credits table which is related to a names table and a roles table] Credit D [related credits table which is related to a names table and a roles table] etc.
Along with other related info on the page that will have to be displays like Credits.
Am I missing something that's obvious in the documentation?
Could you show the structure of database first?
Yes, here it is.
recordings
id
song_title_id
info
song_title
id
song_title
credits
id
recording_id
name_id
role_id
names
id
name
roles
id
role
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community