Skip to content

Glossary: Laravel

Relationship

Also written: hasMany, belongsTo, relationships

A model method linking two tables. hasMany means many rows in another table hold my id, and belongsTo means my foreign key points at one row.

Where the book teaches it

Related terms

Foreign keyEager loadingEloquent