πͺUpdate Metadata
π₯ updateMetadataById
updateMetadataById// Syntax
$model->updateMetadataById(string $id, array|Collection $metadata): boolExample Usage
$company->createMetadata(['theme' => 'dark']);
$company->updateMetadataById($id, ['theme' => 'light']);
// Using array
$company->updateMetadataById($id, ['theme' => 'auto', 'year' => 1997]);
// The updated metadata will be:
[
'theme' => 'auto',
'year' => 1997,
];
// Using Collection
$company->updateMetadataById($id, collect(['theme' => 'dark', 'year' => 1998]));
// The updated metadata will be:
[
'theme' => 'dark',
'year' => 1998,
];Parameters
Data Types
id
string
metadata
array, Collection
π₯ updateKeysMetadataById
updateKeysMetadataByIdExample Usage
Parameters
Data Types
id
string
keys
array, Collection, string, int, null
value
array, Collection, string, int, float, bool, null
π₯ updateKeyMetadataById
updateKeyMetadataById It's an Alias of the `updateKeysMetadataById` method used for updating Individual Key
Example usage
Parameters
Data Types
id
string
key
string, int, null
value
array, Collection, string, int, float, bool, null
Last updated