diff --git a/src/Illuminate/Database/Eloquent/Model.php b/src/Illuminate/Database/Eloquent/Model.php index 6bbc42438d7e..13e1716e5497 100644 --- a/src/Illuminate/Database/Eloquent/Model.php +++ b/src/Illuminate/Database/Eloquent/Model.php @@ -230,7 +230,7 @@ public function fill(array $attributes) if ($this->isFillable($key)) { $this->setAttribute($key, $value); } elseif ($totallyGuarded) { - $model = get_class($this); + $model = static::class; throw new MassAssignmentException( "Add [{$key}] to fillable property to allow mass assignment on {$model}." );