BelongsToModel
trait BelongsToModel (View source)
Properties
protected Model|string|Closure|null | $model | ||
protected Closure|null | $loadStateFromRelationshipsUsing | ||
protected Closure|null | $saveRelationshipsUsing | ||
protected Closure|null | $saveRelationshipsBeforeChildrenUsing | ||
protected bool|Closure | $shouldSaveRelationshipsWhenHidden |
Methods
model(Model|string|Closure|null $model = null)
No description
void
saveRelationships()
No description
void
saveRelationshipsBeforeChildren()
No description
void
loadStateFromRelationships(bool $andHydrate = false)
No description
saveRelationshipsWhenHidden(bool|Closure $condition = true)
No description
bool
shouldSaveRelationshipsWhenHidden()
No description
string|null
getModel()
No description
Model|null
getRecord()
No description
Model|null
getModelInstance()
No description
Details
BelongsToModel
model(Model|string|Closure|null $model = null)
No description
void
saveRelationships()
No description
void
saveRelationshipsBeforeChildren()
No description
void
loadStateFromRelationships(bool $andHydrate = false)
No description
BelongsToModel
saveRelationshipsUsing(Closure|null $callback)
No description
BelongsToModel
saveRelationshipsBeforeChildrenUsing(Closure|null $callback)
No description
BelongsToModel
saveRelationshipsWhenHidden(bool|Closure $condition = true)
No description
bool
shouldSaveRelationshipsWhenHidden()
No description
BelongsToModel
loadStateFromRelationshipsUsing(Closure|null $callback)
No description
string|null
getModel()
No description
Model|null
getRecord()
No description
Model|null
getModelInstance()
No description