Skip to content

Commit

Permalink
Updated mass assignment exception wording for clarity; nominating the…
Browse files Browse the repository at this point in the history
… key alone is a little vague
  • Loading branch information
ok200paul committed Dec 29, 2017
1 parent cfa2e86 commit c7f14fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ public function fill(array $attributes)
if ($this->isFillable($key)) {
$this->setAttribute($key, $value);
} elseif ($totallyGuarded) {
throw new MassAssignmentException($key);
throw new MassAssignmentException('Model is guarded. Add key ['.$key.'] to $fillable to allow mass assignment.');
}
}

Expand Down

0 comments on commit c7f14fb

Please sign in to comment.