☂️Sync Metadata
Synchronize metadata for the model.
🔥 syncMetadata
syncMetadataIf metadata already exists, it will be updated.
If it doesn't exist, a new metadata record will be created.
// Syntax
$model->syncMetadata(array|Collection $metadata): boolExample Usage
// Using an array
$model->syncMetadata(['theme' => 'dark', 'views' => 767]);
// Using Collection
$model->syncMetadata(collect(['theme' => 'dark', 'views' => 767]));Parameters
Data Type
metadata
array, Collection
Last updated