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.
Install
composer require law4devs/law4devs
Basic Usage
<?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