From c7f14fbb1b263a590d4ba37a0b8313c5a99e0bfa Mon Sep 17 00:00:00 2001 From: Paul Grimes Date: Fri, 29 Dec 2017 14:39:57 +1100 Subject: [PATCH] Updated mass assignment exception wording for clarity; nominating the key alone is a little vague --- src/Illuminate/Database/Eloquent/Model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php index 11685f869ac3..37b3a546a201 100644 --- a/src/Illuminate/Database/Eloquent/Model.php +++ b/src/Illuminate/Database/Eloquent/Model.php @@ -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.'); } }