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
- Maximum execution time of 30 seconds exceeded Laravel: Symfony\Component\ErrorHandler\Error\FatalError: Maximum execution time of 30 seconds exceeded
- The process exceeded the timeout of 60 seconds Laravel: Symfony\Component\Process\Exception\ProcessTimedOutException: The process "npm run build" exceeded the timeout of 60 seconds
- Laravel: Allowed memory size exhausted (request) Laravel/PHP: Allowed memory size of 134217728 bytes exhausted (tried to allocate 20480 bytes) in vendor/laravel/framework
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