πͺ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
π₯ updateKeysMetadataById
updateKeysMetadataByIdExample Usage
Parameters
Data Types
π₯ updateKeyMetadataById
updateKeyMetadataById Example usage
Parameters
Data Types
Last updated