Skip to content

Feature: codelens to convert $fillable to $guarded #82

@damms005

Description

@damms005

When php artisan make:model, Laravel defaults to protected $fillable = [];

Add a codelens that shows Convert to $guarded if:

  • currently opened file is an Eloquent model
  • underlying table has an id column that is a primary key.

The codelens action will be to replace the above with protected $guraded = ['id']

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions