Skip to content

Commit

Permalink
Docs fix
Browse files Browse the repository at this point in the history
  • Loading branch information
chelout committed Mar 28, 2018
1 parent 92df419 commit b20a34c
Showing 1 changed file with 11 additions and 26 deletions.
37 changes: 11 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@ Missing relationship events for Laravel
```
2. Use necessary trait in your model.
#### Available traits:
- HasOneEvents
- HasBelongsToEvents
- HasManyEvents
- HasBelongsToManyEvents
- HasMorphOneEvents
- HasMorphToEvents
- HasMorphManyEvents
- HasMorphToManyEvents
- HasMorphedByManyEvents
```php
...
use Chelout\RelationshipEvents\Relationships\Concerns\HasOneEvents;
Expand All @@ -28,26 +39,10 @@ class User extends Model
/**
* One To One Relationship Events
*/
static::hasOneSaving(function ($parent, $related) {
dump('hasOneSaving', $parent, $related);
});
static::hasOneSaved(function ($parent, $related) {
dump('hasOneSaved', $parent, $related);
});
static::hasOneCreating(function ($parent, $related) {
dump('hasOneCreating', $parent, $related);
});
static::hasOneCreated(function ($parent, $related) {
dump('hasOneCreated', $parent, $related);
});
static::hasOneUpdating(function ($parent, $related) {
dump('hasOneUpdating', $parent, $related);
});
static::hasOneUpdated(function ($parent, $related) {
dump('hasOneUpdated', $parent, $related);
});
Expand All @@ -56,16 +51,6 @@ class User extends Model
}
```

#### Available traits:
- HasBelongsToEvents
- HasBelongsToManyEvents
- HasManyEvents
- HasMorphedByManyEvents
- HasMorphManyEvents
- HasMorphOneEvents
- HasMorphToEvents
- HasMorphToManyEvents
- HasOneEvents

## Relationships
### One To One:
Expand Down

0 comments on commit b20a34c

Please sign in to comment.