β Has Metadata
Checking metadata is exist or checking specific keys.
π₯ hasMetadata
hasMetadataCheck if a record of the relationship exists.
regardless of whether the metadata content is empty or not.
// Syntax
$model->hasMetadata(): boolπ₯ hasFilledMetadata
hasFilledMetadataCheck if a record of the relationship exists.
Check metadata column contains data that is not empty
// Syntax
$model->hasFilledMetadata(): boolπ₯ hasKeyMetadata
hasKeyMetadataCheck if the metadata contains a specific key.
regardless of whether the key content is empty.
π₯ hasAllKeysMetadata
hasAllKeysMetadataCheck if the metadata contains all specified keys.
regardless of whether all keys content is empty.
π₯ hasAnyKeysMetadata
hasAnyKeysMetadataCheck if metadata contains any of the specified keys.
regardless of whether all keys content is empty.
π Examples
π Summary
hasAllKeysMetadata()- Returns true only if ALL specified keys existhasKeyMetadata()- Convenience method for checking a single key, internally useshasAllKeysMetadata()hasAnyKeysMetadata()- Returns true if ANY of the specified keys exist
Last updated