Skip to main content
๐Ÿ› Bug HuntLV Laravel Mediumโšก+20 XP

Mass Assignment Blocked

Model fails to save with fillable error.

๐Ÿ› Find the bug
1class User extends Model {
2 // No $fillable or $guarded defined
3}
4User::create(['name' => 'Alice', 'email' => 'a@b.com']);
๐Ÿ› The bug is on line 2

๐Ÿ”ง Select the correct fix: