Skip to content

Relationships korrigiert#1

Open
tobias-kuendig wants to merge 1 commit intopatrick-durrer:masterfrom
tobias-kuendig:master
Open

Relationships korrigiert#1
tobias-kuendig wants to merge 1 commit intopatrick-durrer:masterfrom
tobias-kuendig:master

Conversation

@tobias-kuendig
Copy link

Verwende bei belongsToMany/hasMany Relationships immer die Mehrzahl als Methodenname. So macht das Abfragen der Relationships auch mehr Sinn:

// Ein Client hat mehrere Antworten (hasMany)
Client::whereId(1)->answers()->get(); 
// vs.
Client::whereId(1)->answer()->get(); 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

Comments