Patchable
trait Patchable
Patchable trait for models
Properties
protected array | $patchChanges | Changes to attributes and relationships |
Methods
array
getChanges()
Get changes
void
patch(array $data)
Patch model
verifyModel(array $data)
Verify model based on id if present and type
void
patchAttributes(array $attributes)
Patching the attributes
void
patchSingularRelationships(array $relationships)
Patching singular relationships (BelongsTo, HasOne)
void
patchPluralRelationships(array $relationships)
Patching plural relationships (HasMany, BelongsToMany)
void
resolveRelationsModel(string $id, string $type)
Resolve type and id to a model instance
Details
at line 32
array
getChanges()
Get changes
at line 43
void
patch(array $data)
Patch model
at line 62
protected
verifyModel(array $data)
Verify model based on id if present and type
at line 85
protected void
patchAttributes(array $attributes)
Patching the attributes
at line 134
protected void
patchSingularRelationships(array $relationships)
Patching singular relationships (BelongsTo, HasOne)
at line 178
protected void
patchPluralRelationships(array $relationships)
Patching plural relationships (HasMany, BelongsToMany)
at line 242
protected void
resolveRelationsModel(string $id, string $type)
Resolve type and id to a model instance