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

# Tags

> List and retrieve taxonomy tags with the Law4Devs PHP SDK.

## Overview

Tags are a structured taxonomy used to categorize articles, recitals, and requirements. Use `$client->tags` to browse all available tags.

***

## Methods

### `list()`

Returns a page of tags, optionally filtered by framework.

```php theme={null}
// All tags
$page = $client->tags->list();

// Tags relevant to CRA
$page = $client->tags->list(frameworkSlug: 'cra');

foreach ($page->data as $tag) {
    printf("  %-20s %s\n", $tag->slug, $tag->name);
}
```

**Returns** `Page<Tag>`

***

### `get()`

Fetch a single tag by slug.

```php theme={null}
$tag = $client->tags->get('data-breach');
echo $tag->name . ': ' . $tag->description . "\n";
```

**Returns** `Tag`

***

### `iter()`

Iterate over all tags.

```php theme={null}
foreach ($client->tags->iter() as $tag) {
    echo $tag->slug . "\n";
}
```

**Returns** `\Generator<Tag>`

***

## Model

### `Tag`

| Field         | Type           | Description                 |
| ------------- | -------------- | --------------------------- |
| `id`          | `int`          | Internal numeric ID         |
| `slug`        | `string`       | URL-safe identifier         |
| `name`        | `string`       | Display name                |
| `description` | `string\|null` | What this tag means         |
| `keywords`    | `string[]`     | Related search keywords     |
| `color`       | `string`       | Hex color for display       |
| `createdAt`   | `string`       | ISO 8601 creation timestamp |
