Ready to learn?

Interactive Eloquent Documentation for Laravel

Get Started


One to One

A one-to-one relationship is a very basic relation. For example, a User model might be associated with one Phone. To define this relationship, we place a phone method on the User model.

Get started: One to One

travel booking
connected world

One to Many

A one-to-many relationship is used to define relationships where a single model owns any amount of other models. For example, a post may have an infinite number of comments. Like all other Eloquent relationships, one-to-many relationships are defined by placing a function on your Eloquent model

Get started: One to Many