SerializesModels
trait SerializesModels
Traits
Methods
mixed
getSerializedPropertyValue(mixed $value)
Get the property value prepared for serialization.
mixed
getRestoredPropertyValue(mixed $value)
Get the restored property value after deserialization.
array
__sleep()
Prepare the instance for serialization.
void
__wakeup()
Restore the model after serialization.
mixed
Details
in
SerializesAndRestoresModelIdentifiers at line 18
protected mixed
getSerializedPropertyValue(mixed $value)
Get the property value prepared for serialization.
in
SerializesAndRestoresModelIdentifiers at line 37
protected mixed
getRestoredPropertyValue(mixed $value)
Get the restored property value after deserialization.
in
SerializesAndRestoresModelIdentifiers at line 55
protected Collection
restoreCollection(ModelIdentifier $value)
Restore a queueable collection instance.
in
SerializesAndRestoresModelIdentifiers at line 73
protected Builder
getQueryForModelRestoration(Model $model)
Get the query for restoration.
at line 17
array
__sleep()
Prepare the instance for serialization.
at line 37
void
__wakeup()
Restore the model after serialization.
at line 52
protected mixed
getPropertyValue(ReflectionProperty $property)
Get the property value for the given property.