🪣Delete Metadata

Deleting metadata of model using HasOneMetadata

🔥 deleteMetadata

Delete all metadata records

// Syntax
$model->deleteMetadata(): bool

Example Usage


// Delete the metadata
if ($model->deleteMetadata()) {
    echo "All Metadata successfully deleted";
} else {
    echo "No metadata to delete or deletion failed";
}


$status = $model->deleteMetadata(); // return boolean

Return Type ⇒ Boolean


🔥 deleteMetadataById

Delete a metadata record By ID

// Syntax
$model->deleteMetadataById(string $id): bool

Example Usage


// Delete the metadata by Id
if ($model->deleteMetadataById($id)) {
    echo "Metadata successfully deleted";
} else {
    echo "No metadata to delete or deletion failed";
}


$status = $model->deleteMetadataById($id); // return boolean
Parameters
Data Type

id

string

Return Type ⇒ Boolean

Last updated