@@ -494,7 +494,7 @@ discard block |
||
| 494 | 494 | |
| 495 | 495 | $attributes[$key] = $this->mutateAttributeForArray( |
| 496 | 496 | $key, $attributes[$key] |
| 497 | - ); |
|
| 497 | + ); |
|
| 498 | 498 | } |
| 499 | 499 | |
| 500 | 500 | // Next we will handle any casts that have been setup for this model and cast |
@@ -508,7 +508,7 @@ discard block |
||
| 508 | 508 | |
| 509 | 509 | $attributes[$key] = $this->castAttribute( |
| 510 | 510 | $key, $attributes[$key] |
| 511 | - ); |
|
| 511 | + ); |
|
| 512 | 512 | } |
| 513 | 513 | |
| 514 | 514 | // Here we will grab all of the appended, calculated attributes to this model |
@@ -543,7 +543,7 @@ discard block |
||
| 543 | 543 | } |
| 544 | 544 | |
| 545 | 545 | return $this->getArrayableItems( |
| 546 | - array_combine($this->appends, $this->appends) |
|
| 546 | + array_combine($this->appends, $this->appends) |
|
| 547 | 547 | ); |
| 548 | 548 | } |
| 549 | 549 | |
@@ -710,26 +710,26 @@ discard block |
||
| 710 | 710 | } |
| 711 | 711 | |
| 712 | 712 | switch ($this->getCastType($key)) { |
| 713 | - case 'int': |
|
| 713 | + case 'int': |
|
| 714 | 714 | case 'integer': |
| 715 | 715 | return (int) $value; |
| 716 | - case 'real': |
|
| 716 | + case 'real': |
|
| 717 | 717 | case 'float': |
| 718 | 718 | case 'double': |
| 719 | 719 | return (float) $value; |
| 720 | - case 'string': |
|
| 720 | + case 'string': |
|
| 721 | 721 | return (string) $value; |
| 722 | - case 'bool': |
|
| 722 | + case 'bool': |
|
| 723 | 723 | case 'boolean': |
| 724 | 724 | return (bool) $value; |
| 725 | - case 'object': |
|
| 725 | + case 'object': |
|
| 726 | 726 | return $this->fromJson($value, true); |
| 727 | - case 'array': |
|
| 727 | + case 'array': |
|
| 728 | 728 | case 'json': |
| 729 | 729 | return $this->fromJson($value); |
| 730 | - case 'collection': |
|
| 730 | + case 'collection': |
|
| 731 | 731 | return Collection::wrap($this->fromJson($value)); |
| 732 | - default: |
|
| 732 | + default: |
|
| 733 | 733 | return $value; |
| 734 | 734 | } |
| 735 | 735 | } |