We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 675d735 commit 39c4d5eCopy full SHA for 39c4d5e
1 file changed
src/Data.php
@@ -53,6 +53,7 @@ public static function from($data): static
53
*/
54
public function fill(array $data): static
55
{
56
+ $this->beforeFill($data);
57
if (empty($data)) {
58
return $this;
59
}
@@ -90,6 +91,7 @@ public function fill(array $data): static
90
91
92
93
94
+ $this->afterFill($data);
95
96
97
@@ -172,4 +174,8 @@ protected function isArrayAble($data): bool
172
174
173
175
return $data instanceof ArrayAble || is_object($data) && method_exists($data, 'toArray');
176
177
+
178
+ protected function beforeFill(array $data): void {}
179
180
+ protected function afterFill(array $data) {}
181
0 commit comments