πŸ“­Has Metadata

Checking metadata is exist or checking specific keys.

πŸ”₯ hasMetadata

  • Check if records of the relationship exist.

  • regardless of whether the metadata content is empty or not.

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


πŸ”₯ hasMetadataById

  • Check if a metadata record exists by ID.

  • regardless of whether its metadata field contains data or not.

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


πŸ”₯ hasFilledMetadataById

  • Check if a metadata record exists by ID.

  • Check if it contains non-empty data.

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

Last updated