1212use Countable ;
1313use Illuminate \Contracts \Support \Arrayable ;
1414use Illuminate \Contracts \Support \Jsonable ;
15+ use Illuminate \Support \Arr ;
1516use Illuminate \Support \Collection ;
1617use Illuminate \Support \Str ;
1718use InvalidArgumentException ;
@@ -356,7 +357,7 @@ public function __debugInfo(): array
356357 */
357358 public function meta (string $ key = null , mixed $ default = null ): mixed
358359 {
359- return null !== $ key ? data_get ($ this ->meta , $ key , $ default ) : $ this ->meta ;
360+ return null !== $ key ? Arr:: get ($ this ->meta , $ key , $ default ) : $ this ->meta ;
360361 }
361362
362363 /**
@@ -369,7 +370,7 @@ public function meta(string $key = null, mixed $default = null): mixed
369370 */
370371 public function origin (string $ key = null , mixed $ default = null ): mixed
371372 {
372- return null !== $ key ? data_get ($ this ->originAttributes , $ key , $ default ) : $ this ->originAttributes ;
373+ return null !== $ key ? Arr:: get ($ this ->originAttributes , $ key , $ default ) : $ this ->originAttributes ;
373374 }
374375
375376 /**
@@ -453,7 +454,7 @@ public function only(array $keys): static
453454
454455 foreach ($ keys as $ key ) {
455456 if ($ this ->offsetExists ($ key )) {
456- data_set ($ array , $ key , $ this ->offsetGet ($ key ));
457+ Arr:: set ($ array , $ key , $ this ->offsetGet ($ key ));
457458 }
458459 }
459460
@@ -491,7 +492,7 @@ public function toJson($options = 0): string
491492 */
492493 public function offsetGet (mixed $ offset ): mixed
493494 {
494- return data_get ($ this ->attributes , $ offset );
495+ return Arr:: get ($ this ->attributes , $ offset );
495496 }
496497
497498 /**
@@ -517,15 +518,15 @@ public function offsetExists(mixed $offset): bool
517518 */
518519 public function offsetSet (mixed $ offset , mixed $ value ): void
519520 {
520- data_set ($ this ->attributes , $ offset , $ value );
521+ Arr:: set ($ this ->attributes , $ offset , $ value );
521522 }
522523
523524 /**
524525 * {@inheritDoc}
525526 */
526527 public function offsetUnset (mixed $ offset ): void
527528 {
528- data_forget ($ this ->attributes , $ offset );
529+ Arr:: forget ($ this ->attributes , $ offset );
529530 }
530531
531532 /**
0 commit comments