Skip to content

Commit

Permalink
Add reference to model in MassAssignmentException
Browse files Browse the repository at this point in the history
  • Loading branch information
rap2hpoutre authored Feb 20, 2018
1 parent 201bbec commit d84a0e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Illuminate/Database/Eloquent/Model.php
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,9 @@ public function fill(array $attributes)
if ($this->isFillable($key)) {
$this->setAttribute($key, $value);
} elseif ($totallyGuarded) {
$model = get_class($this);
throw new MassAssignmentException(
"Add [{$key}] to fillable property to allow mass assignment."
"Add [{$key}] to fillable property to allow mass assignment on {$model}."
);
}
}
Expand Down

0 comments on commit d84a0e2

Please sign in to comment.