Shift with red gradient lettering

Adopt unguarded models

Premium
Laravel

Convert models using the fillable property to be "unguarded" with the $guarded = [] property. Depending on your application code, this may create a mass assignment vulnerability.

Before

class Customer extends Model
{
/**
* The attributes that are mass assignable.
*
* @var string[]
*/
protected $fillable = ['name', 'email'];
}

After

class Customer extends Model
{
/**
* The attributes that aren't mass assignable.
*
* @var string[]|bool
*/
protected $guarded = [];
}

← Back to the Workbench Tasks

Sign in with any of the following services to connect Shift with your Laravel project.


Don't use one of these services?

Temporarily push your project to a free, private repository on one of these cloud-based services or upgrade your project locally with Shift for Docker.