Skip to content

Commit 221f033

Browse files
committed
wip
1 parent 64e45e7 commit 221f033

File tree

1 file changed

+21
-0
lines changed
  • docs/docs/4.0/repository-pattern

1 file changed

+21
-0
lines changed

docs/docs/4.0/repository-pattern/field.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,27 @@ Field::new('description')->default('N/A');
225225

226226
So now, for fields which don't have a description into the database, it will return `N/A`.
227227

228+
## After store
229+
230+
You can handle the after field store callback:
231+
232+
```php
233+
Field::new('title')->afterStore(function($value) {
234+
dump($value);
235+
})
236+
```
237+
238+
239+
## After update
240+
241+
You can handle the after field is updated callback:
242+
243+
```php
244+
Field::new('title')->afterUpdate(function($value, $oldValue) {
245+
dump($value, $oldValue);
246+
})
247+
```
248+
228249
# Variations
229250

230251
## File fields

0 commit comments

Comments
 (0)