Skip to content

Commit

Permalink
Returns self after merge casts (#35677)
Browse files Browse the repository at this point in the history
  • Loading branch information
finagin authored Dec 20, 2020
1 parent 840166a commit 2dc6ce5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -514,11 +514,13 @@ protected function mutateAttributeForArray($key, $value)
* Merge new casts with existing casts on the model.
*
* @param array $casts
* @return void
* @return $this
*/
public function mergeCasts($casts)
{
$this->casts = array_merge($this->casts, $casts);

return $this;
}

/**
Expand Down

0 comments on commit 2dc6ce5

Please sign in to comment.