# Search Metadata

## 🔥 `searchMetadata`&#x20;

Search metadata records by value and return results as an array.

```php
// Syntax
$model->searchMetadata(mixed $searchTerm): array
```

* string: searches for exact string match.
* number: searches for an exact numeric match.
* array: searches for exact array match.
* boolean: searches for an exact boolean match.

#### Example Usage

```php


$post->searchMetadata('dark');
/** will return:
* [
*     [
*        'id' => '01jj9s16xcze6byv94fv2f6gc5',
*        'theme' => 'dark',
*        'language' => 'Arabic',
*     ]
* ]
*/

```

***

## 🔥 `searchMetadataCollection`

{% hint style="success" %}
It's an Alias `searchMetadata` but return as `Collection`&#x20;
{% endhint %}

```php
// Syntax
$model->searchMetadataCollection(mixed $searchTerm): Collection
```
