Reports assignments to guarded attributes in Laravel Eloquent models.
Laravel Eloquent models have a $fillable and $guarded property that control mass assignment of specified attributes.
This inspection detects when you try to directly assign values to guarded attributes, which may lead to security vulnerabilities.
To fix this:
- Remove the attribute from the $guarded array if it should be mass assignable
- Use setAttribute() method instead of direct assignment
- Add the attribute to the $fillable array instead of $guarded