Skip to content

Commit

Permalink
Add section on model fillable
Browse files Browse the repository at this point in the history
  • Loading branch information
pboivin authored and ifox committed Jul 6, 2021
1 parent 03dcfbd commit 22dfaa4
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/.sections/form-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -1088,6 +1088,20 @@ class Team extends Model
}
```

#### Update the `TeamMember` model

Add `team_id` to the `fillable` array:

```php
class TeamMember extends Model
{
protected $fillable = [
/* ... */
'team_id',
];
}
```

#### Update `TeamRepository`

Override the `afterSave` and `getFormFields` methods to process the repeater field:
Expand Down

0 comments on commit 22dfaa4

Please sign in to comment.