Skip to content

Commit

Permalink
Merge pull request #1268 from tonypartridge/patch-1
Browse files Browse the repository at this point in the history
Add more detail to manipulating changes
  • Loading branch information
Gummibeer authored Feb 29, 2024
2 parents d6f13d6 + c0c368a commit eb4f20e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion docs/advanced-usage/manipulate-changes-array.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,17 @@ class YourPipe implements LoggablePipe
}

```

Then you can apply this when calling your model with:
```php
YourModel::addLogChange(new YourPipe);
```

However, you may wish to ensure it's always called within the model and as such you could apply it during model boot with the following:

```php
protected static function booted(): void
{
static::addLogChange(new YourPipe);
}
```

0 comments on commit eb4f20e

Please sign in to comment.