Laravel: Illuminate\Database\Eloquent\MassAssignmentException: Add [x] to fillable property to allow mass assignment
You passed an array to create()/update()/fill() containing a field that isn’t in the model’s $fillable list.
Add [title] to fillable property to allow mass assignmentto fillable property Meaning
Laravel protects models from mass assignment of unexpected fields. Add the field to $fillable (recommended) or use $guarded deliberately — never unguard everything for request data.
Common causes
- Field not listed in $fillable
- Using $request->all() with extra fields
- Model uses $guarded = ['*'] (default)
⚡ Quick fix
- Add the attribute to protected $fillable
- Pass only validated data ($request->validated())
- Use $model->field = value for one-off assignments
Detailed fix by platform
PHP
- php
class Post extends Model { protected $fillable = ['title', 'body', 'user_id']; } Post::create($request->validated());
How to diagnose
- Model — $fillable/$guarded
- Input — Which field is named?
🔧 Still not fixed?
Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:
Similar errors
- ActiveModel::ForbiddenAttributesError (strong parameters) Rails: ActiveModel::ForbiddenAttributesError
- BadMethodCallException: Call to undefined method Laravel: BadMethodCallException: Call to undefined method App\Models\Post::whereTitle() / Illuminate\Database\Eloquent\Builder::foo()
- No query results for model Laravel: Illuminate\Database\Eloquent\ModelNotFoundException: No query results for model [App\Models\Post] 5
Most viewed in Laravel
- The Mix manifest does not exist Laravel Mix: Illuminate\Foundation\Exceptions\... The Mix manifest does not exist. (public/mix-manifest.json)
- 403 This action is unauthorized Laravel: Illuminate\Auth\Access\AuthorizationException: This action is unauthorized.
- PDOException: could not find driver Laravel: Illuminate\Database\QueryException: could not find driver (SQL: select * from information_schema.tables)
Other ways to find it
Where this error sits
Origin: Application & API. Errors that are often confused with or caused by this one (click to open):
🧠 Still stuck? Analyze your error
Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.
💬 What worked for others
No tips yet — did something else fix this for you?
Share what worked for you
Tips are checked by an editor before they appear. Links are removed.
Report a correction or suggest an improvement
Last updated 13 Oct 2026