Skip to content

Reguard model in seeding not working #18932

@projct1

Description

@projct1
  • Laravel Version: 5.4.19

Description:

  • Trying to enable $fillable and $guard attributes on all model in seeding.
  • For that, trying to write Illuminate\Database\Eloquent\Model::reguard() in method run before start seeding in main class DatabaseSeeder.
  • And occur exception Illuminate\Database\Eloquent\MassAssignmentException on field, which present on $fillable attribute.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions