Eloquent relationships model how database tables relate, defined as methods on models. Laravel supports all common relationship types — one-to-many, many-to-many, one-to-one, and more — giving you elegant, object-oriented access to related data.
One-to-many (hasMany / belongsTo)
{
{
->(::);
}
}
{
{
->(::);
}
}
->posts;
->author;
->()->(, )->();
