> ## Documentation Index
> Fetch the complete documentation index at: https://docs.eloquentfiltering.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Or

export const type_0 = "$or"

## Definition

<Note>
  The condition filters `$or`, and `$and` are not required to be defined when allowing filters.

  These filters are always allowed, due to these filters essentially being wrappers around other filters.
</Note>

## Array/Object Structure

<ParamField body="type" type="string" required>
  <code>
    {type_0}
  </code>
</ParamField>

<ParamField body="value" type="array,min:2" required />

<ParamField body="value.*" type="array" required>
  Any other filter
</ParamField>

## Example

```php theme={null}
$filter = [
    'type'  => '$or',
    'value' => [
        [
            'type'   => '$like',
            'target' => 'content',
            'value'  => 'awesome',
        ],
        [
            'type'   => '$like',
            'target' => 'content',
            'value'  => 'boring',
        ]
    ]
];
```

```php theme={null}
$sql = Comment::filter([$filter])->toRawSql();
```

### SQL

```sql theme={null}
select *
  from "comments"
 where (
       ("comments"."content" LIKE '%awesome%')
    or
       ("comments"."content" LIKE '%boring%')
 )
```

## Modifiers

None available.
