> ## 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.

# Like

export const type_2 = "$like:end"

export const type_1 = "$like:start"

export const type_0 = "$like"

## Definition

```php theme={null}
Filter::field('description', [FilterType::LIKE])
```

## Array/Object Structure

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

<ParamField body="target" type="string" required />

<ParamField body="value" type="string|int|float" required />

## Example

```php theme={null}
$filter = [
    'type'   => '$like',
    'target' => 'description',
    'value'  => 'Laravel',
];
```

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

### SQL

```sql theme={null}
select * from "projects" where "projects"."description" LIKE '%Laravel%'
```

## Modifiers

### Start

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

```sql theme={null}
select * from "projects" where "projects"."description" LIKE 'Laravel%'
```

### End

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

```sql theme={null}
select * from "projects" where "projects"."description" LIKE '%Laravel'
```
