Skip to content

Commit 3b7f7a2

Browse files
committed
Update package description
1 parent 531f68e commit 3b7f7a2

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
[![Build Status](https://img.shields.io/github/actions/workflow/status/stayallive/laravel-inverse-relations/ci.yaml?branch=master&style=flat-square)](https://github.com/stayallive/laravel-inverse-relations/actions/workflows/ci.yaml)
66
[![Total Downloads](https://img.shields.io/packagist/dt/stayallive/laravel-inverse-relations.svg?style=flat-square)](https://packagist.org/packages/stayallive/laravel-inverse-relations)
77

8-
Inverse relations for Laravel Eloquent models.
8+
`HasMany`, `HasOne` and `MorphMany` Eloquent relations with inverse hydration.
99

1010
[Jonathan Reinink](https://github.com/reinink) wrote a great blog post about [optimizing circular relationships in Laravel](https://reinink.ca/articles/optimizing-circular-relationships-in-laravel).
1111
The package [stancl/laravel-hasmanywithinverse](https://github.com/archtechx/laravel-hasmanywithinverse) ran with that idea and implemented it for the `hasMany` relation. This package improves on that by implementing it for the `hasOne` and `morphMany` relations too.
1212

13-
In short, this package allows you to define inverse relations on your models. This means that you can define a relation on a model that points to another model. This is useful when you have a circular relationship between two models and you want to be able to access the inverse relation without having to load the other model from the database.
13+
In short, this package allows you to define inverse relations on your models. This means that you can define a relation on a model that points to another model. This is useful when you have a circular relationship between two models and you want to be able to access the inverse relation without having to load the other model from the database potentially saving a lot of database queries.
1414

1515
## Installation
1616

@@ -20,9 +20,9 @@ composer require stayallive/laravel-inverse-relations
2020

2121
## Usage
2222

23-
Adding the `HasHasManyWithInverseRelation`, `HasHasOneWithInverseRelation` and/or `HasMorphManyWithInverseRelation` trait will provide you with the helper methods to setup the inverse relations.
23+
Adding the `HasHasManyWithInverseRelation`, `HasHasOneWithInverseRelation` and/or `HasMorphManyWithInverseRelation` traits will provide you with the helper methods to setup the inverse relations.
2424

25-
Check out the test stubs for examples on how to use the trait on your models:
25+
Check out the test stubs for examples on how to implement the traits on your models to setup the inverse relations:
2626

2727
- [HasMany](tests/Stubs/HasManyWithInverse)
2828
- [HasOne](tests/Stubs/HasOneWithInverse)

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "stayallive/laravel-inverse-relations",
33
"type": "library",
4-
"description": "HasMany, HasOne and MorphMany Eloquent relations with inverse improvements.",
4+
"description": "HasMany, HasOne and MorphMany Eloquent relations with inverse hydration.",
55
"keywords": [
66
"laravel",
77
"eloquent",

0 commit comments

Comments
 (0)