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

# Quick Start

> Make your first Law4Devs API call with PHP in under 60 seconds.

## Install

```bash theme={null}
composer require law4devs/law4devs
```

## Basic Usage

```php theme={null}
<?php

require_once 'vendor/autoload.php';

use Law4Devs\Client;

$client = new Client(apiKey: getenv('LAW4DEVS_API_KEY'));

// List all frameworks
$page = $client->frameworks->list();
foreach ($page->data as $fw) {
    echo $fw->slug . ' — ' . $fw->name . "\n";
}

// List first 5 CRA articles
$articles = $client->articles->list('cra', perPage: 5);
foreach ($articles->data as $article) {
    echo 'Art. ' . $article->articleNumber . ': ' . $article->title . "\n";
}

// Auto-paginate all GDPR articles
foreach ($client->articles->iter('gdpr') as $article) {
    echo $article->articleNumber . ' ' . $article->title . "\n";
}

// Search across all frameworks
$results = $client->search->query('data breach notification');
echo 'Found ' . $results->meta->total . " results\n";
```

## Next Steps

<CardGroup cols={2}>
  <Card title="Frameworks →" href="/sdks/php/frameworks" icon="building-columns" color="#0EA5E9" />

  <Card title="Articles →" href="/sdks/php/articles" icon="file-lines" color="#8B5CF6" />

  <Card title="Pagination →" href="/sdks/php/pagination" icon="list" color="#22c55e" />

  <Card title="Error Handling →" href="/sdks/php/error-handling" icon="triangle-exclamation" color="#f59e0b" />
</CardGroup>
