{"id":37000741,"url":"https://github.com/jdkweb/rdw-api-filament","last_synced_at":"2026-01-14T00:04:31.292Z","repository":{"id":276998579,"uuid":"925087621","full_name":"jdkweb/rdw-api-filament","owner":"jdkweb","description":"Filament extension for the Laravel rdw-api. The rdw-api is a wrapper for opendata.rdw.nl","archived":false,"fork":false,"pushed_at":"2025-03-27T10:22:38.000Z","size":141,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-28T09:29:28.858Z","etag":null,"topics":["filament","filamentphp","php","rdw","rdwapi"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jdkweb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-31T07:45:36.000Z","updated_at":"2025-03-27T10:22:41.000Z","dependencies_parsed_at":"2025-02-11T15:52:55.121Z","dependency_job_id":"8b892223-df0c-4eab-bb61-bcdc17e7226f","html_url":"https://github.com/jdkweb/rdw-api-filament","commit_stats":null,"previous_names":["jdkweb/rdw-api-filament"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/jdkweb/rdw-api-filament","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdkweb%2Frdw-api-filament","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdkweb%2Frdw-api-filament/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdkweb%2Frdw-api-filament/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdkweb%2Frdw-api-filament/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jdkweb","download_url":"https://codeload.github.com/jdkweb/rdw-api-filament/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jdkweb%2Frdw-api-filament/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28406472,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["filament","filamentphp","php","rdw","rdwapi"],"created_at":"2026-01-14T00:04:30.413Z","updated_at":"2026-01-14T00:04:31.280Z","avatar_url":"https://github.com/jdkweb.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RDW API extension for Filament\n\n[![Packagist Version](https://img.shields.io/packagist/v/jdkweb/rdw-api-filament)](https://github.com/jdkweb/rdw-api-filament)\n[![Static Badge](https://img.shields.io/badge/build-%20%3E%3D%208.1-brightgreen?style=flat\u0026logo=php\u0026logoSize=16\u0026label=PHP)](https://github.com/jdkweb/rdw-api-filament) \n[![Static Badge](https://img.shields.io/badge/build-%20%3E%3D%2010-slategray?style=flat-square\u0026logo=laravel\u0026logoColor=white\u0026logoSize=16\u0026label=Laravel)](https://github.com/jdkweb/rdw-api-filament)\n[![Static Badge](https://img.shields.io/badge/build-%20%3E%3D%203.0-blue?style=flat-square\u0026logo=laravel\u0026logoColor=white\u0026logoSize=16\u0026label=Filament)](https://github.com/jdkweb/rdw-api-filament)\n[![Packagist Dependency Version](https://img.shields.io/packagist/dependency-v/jdkweb/rdw-api-filament/jdkweb%2Frdw-api)](https://packagist.org/packages/jdkweb/rdw-api)\n\nLaravel wrapper for the Dutch open mobility data. Basic Vehicle Registration All non-sensitive data of the Dutch vehicle fleet. \n\nLaravel application to get vehicle information from [opendata.rdw.nl](https://opendata.rdw.nl) or [overheid.io](https://overheid.io).\n\nDepends on:\n[![Static Badge](https://img.shields.io/badge/build-jdkweb%2Frdw--api-blue?style=flat-square\u0026logo=github\u0026label=Github)](https://github.com/jdkweb/rdw-api)\n[![Static Badge](https://img.shields.io/badge/build-jdkweb%2Frdw--api-blue?style=flat-square\u0026logo=packagist\u0026logoColor=white\u0026label=Packagist)](https://packagist.org/packages/jdkweb/rdw-api)\n\nThis package extends [jdkweb/rdw-api](https://github.com/jdkweb/rdw-api?tab=readme-ov-file#demo) to be used in [Filament](https://filamentphp.com/). \n\n\n\n## Table of contents\n\n- [Installation](#installation)\n- [Translation](#translation)\n- [Usage](#usage)\n  - [Form Field](#formfield)\n  - [Handle Response](#response)\n- [Example](#example)  \n- [Demo](#demo)\n\n\n## Installation\nRequires PHP 8.1 and Laravel 10 and Filament 3.0 or higher \\\nInstall the package via composer:\n```bash\ncomposer require jdkweb/rdw-api-filament\n```\n## Translation\nTranslations available:\n- [Dutch (nl)](https://github.com/jdkweb/rdw-api/tree/main/lang/nl)\n- [English (en)](https://github.com/jdkweb/rdw-api/tree/main/lang/en)\n\nSee: \n[![Static Badge](https://img.shields.io/badge/build-jdkweb%2Frdw--api-blue?style=flat-square\u0026logo=github\u0026label=Github)](https://github.com/jdkweb/rdw-api/tree/main?tab=readme-ov-file#translation) \n[![Static Badge](https://img.shields.io/badge/build-jdkweb%2Frdw--api-blue?style=flat-square\u0026logo=packagist\u0026logoColor=white\u0026label=Packagist)](https://packagist.org/packages/jdkweb/rdw-api)\n\n# Usage\n- [Form Field](#formfield)\n- [RDW Response](#response)\n \n## \u003ca name=\"formfield\"\u003e\u003c/a\u003eForm Field\n### Basic usage\n![filament setup](https://www.jdkweb.nl/git/images/rdw-api-filament1.webp)\n```php\nuse Jdkweb\\RdwApi\\Filament\\Forms\\Components\\RdwApiLicenseplate;\n...\nRdwApiLicenseplate::make('licenseplate')\n    -\u003elabel(__('rdw-api::form.licenseplateLabel'))\n    -\u003edefault('155GV3')    \n    -\u003elicenseplateStyle()  // Basic style Dutch licenseplate\n```\n- Request to the active API (default: opendata.rdw.nl) \\\n- All RDW endpoints are selected\n### All options used\n\n```php\nuse Jdkweb\\RdwApi\\Filament\\Enums\\Endpoints;\nuse Jdkweb\\RdwApi\\Filament\\Enums\\OutputFormats;\nuse Jdkweb\\RdwApi\\Filament\\Forms\\Components\\RdwApiLicenseplate;\n...\nRdwApiLicenseplate::make('licenseplate')\n    -\u003elabel(__('rdw-api::form.licenseplateLabel'))\n    -\u003edefault('155GV3')    \n    -\u003esetApi(1)\n    -\u003esetEndpoints(Endpoints::cases())    \n    -\u003esetOutputformat(OutputFormats::ARRAY)    \n    -\u003esetLanguage('en')\n    -\u003elicenseplateStyle() \n```\n### Options\n#### Select other API than default\n```php\n-\u003esetApi(int|string|\\Closure) // 0 | opendata | 1 | overheid    \n```\nOverwrite the config settings \n- 0 or 'opendata' for using the RDW API opendata.rdw.nl **[default]**\n- 1 or 'overheidio' for using the overheid.io API\n\n#### Select endpoints for request\n\n```php\nuse \\Jdkweb\\RdwApi\\Enums\\Endpoints;\n...\n-\u003esetEndpoints(string|array|Endpoints|\\Closure)\n\n#examples  \n    # one string\n    -\u003esetEndpoints('vehicle')       \n    # array with strings\n    -\u003esetEndpoints([                \n        'vehicle',\n        'fuel'\n    ])\n    # array with endpoints\n    -\u003esetEndpoints([                \n        Endpoints::VEHICLE,\n        Endpoints::FUEL,    \n    ])    \n    # closure\n    -\u003esetEndpoints(fn() =\u003e ($when ? Endpoints::cases() : Endpoints::BODYWORK))\n    # select all\n    -\u003esetEndpoints(Endpoints::cases())    \n````\nAvailable endpoints (not case sensitive):\n- Endpoints::VEHICLE | vehicle\n- Endpoints::VEHICLE_CLASS |vehicle_class\n- Endpoints::FUEL | fuel\n- Endpoints::BODYWORK | bodywork\n- Endpoints::BODYWORK_SPECIFIC | bodywork_specific\n- Endpoints::AXLES | axles \n- Endpoints::cases() **[default]**\n\n#### Format of the response output\n```php  \n-\u003eoutputFormat(string|OutputFormat|\\Closure)\n\n#examples  \n    -\u003eoutputFormat('array')\n    -\u003eoutputFormat(OutputFormat::ARRAY)\n    -\u003esetOutputformat(fn(Forms\\Get $get) =\u003e $get('output_format'))\n```\n- OutputFormat::ARRAY | array **[default]**\n- OutputFormat::JSON | json\n- OutputFormat::AML | xml\n\nby using this method the response contains a formated output. see [RdwApiResponse](#RdwApiResponse)  \n\n#### Set output language\n```php\n-\u003esetLanguage(string|\\Closure)\n```\nForce output language, so form can be English and RDW response in Dutch. \\\nAvailable:\n  - nl \n  - en\n\n#### Basic style for Dutch licenseplate\n```php\n-\u003elicenseplateStyle() \n-\u003elicenseplateStyle('taxi')  // blue taxi plate \n```\n\n### \u003ca title=\"response\"\u003e\u003c/a\u003eHandle RDW response\nRDW API request with to filament form data \n```php\npublic function handleForm(string $form): void\n{\n    $result = RdwApiRequest::make()\n        -\u003esetFormData($this-\u003eform)\n        -\u003efetch();\n```\n#### RDW Response\nResponse data form the RDW API request in $result:\n```php\nJdkweb\\RdwApi\\Controllers\\RdwApiResponse {#2800 ▼\n  +response: array:2 [▶]    // API response\n  +request: {#3036 ▶}       // Request vars\n  +output: array:2 [▶]      // Formated output when setOutputFormat is used\n  +status: true\n}\n```\nSee rdw-api for the [response methods](https://github.com/jdkweb/rdw-api/tree/main?tab=readme-ov-file#response)\n\n## Example\n![filament setup](https://www.jdkweb.nl/git/images/rdw-api-filament2.webp)\n\nCreate Filament form\n\n```php\nuse Jdkweb\\RdwApi\\Filament\\Enums\\Endpoints;\nuse Jdkweb\\RdwApi\\Filament\\Enums\\OutputFormats;\nuse Jdkweb\\RdwApi\\Controllers\\RdwApiRequest;\nuse Jdkweb\\RdwApi\\Filament\\Forms\\Components\\RdwApiLicenseplate;\nuse Jdkweb\\RdwApi\\Filament\\Forms\\Components\\RdwApiResponse;\n...\n\n/**\n * Dataset Selectbox \n */\nForms\\Components\\Select::make('datasets')\n    -\u003elabel(__('rdw-api::form.selectdatasetLabel'))\n    -\u003emultiple()\n    -\u003eoptions(Endpoints::class)\n    -\u003edefault([\n        Endpoints::VEHICLE,\n        Endpoints::FUEL\n    ])\n    -\u003ehintAction(selectAllDatasets())   // Helper function for select all link\n    -\u003ereactive() // Enables reactivity\n    -\u003erequired(),\n    \n//-----------------------------------------------------------------------------    \n\n/**\n * Licenseplate\n *\n * Extra reactive data for Endpoints and outputFormat   \n */    \nRdwApiLicenseplate::make('licenseplate')\n    -\u003elabel(__('rdw-api::form.licenseplateLabel'))\n    -\u003esetOutputformat(fn(Forms\\Get $get) =\u003e $get('output_format'))\n    -\u003esetEndpoints(fn(Forms\\Get $get) =\u003e $get('datasets'))\n    -\u003erequired()\n    -\u003elicenseplateStyle()\n    -\u003elive(true)\n    -\u003eafterStateUpdated(function ($state, Forms\\Set $set) use ($form) {\n\n        $result = \\Jdkweb\\RdwApi\\Controllers\\RdwApiRequest::make()\n            -\u003esetFormData($form)\n            -\u003efetch();\n\n        if ($result-\u003estatus === false) {\n            return;\n        }\n\n        // Handle data\n        // $set('merk', $result-\u003equickSearch('merk'));\n        // $set('voertuigsoort', $result-\u003equickSearch('voertuigsoort'));\n        // $set('brandstof_omschrijving', $result-\u003equickSearch('1.brandstof_omschrijving')); // type or  hybrid: first type\n        // $set('aslast', $result-\u003equickSearch('2.wettelijk_toegestane_maximum_aslast')); // second axle       \n        // ...    \n    }),    \n    \n//-----------------------------------------------------------------------------    \n\n/**\n * Selectbox for the output format \n */    \nForms\\Components\\Select::make('output_format')\n    -\u003elabel(__('rdw-api::form.formatLabel'))\n    -\u003erequired()\n    -\u003edefault(OutputFormats::XML)\n    -\u003eoptions(OutputFormats::class)\n    -\u003ereactive() // Enables reactivity\n```\nHandle Form data\n```php\n...\n\npublic function handleForm(string $form): void\n{\n\n    // Get RDW data\n    $result = RdwApiRequest::make()\n        -\u003esetFormData($this-\u003eform)\n        -\u003efetch();\n    ...\n    ..\n    \n    // Handle data format \n    switch ($data-\u003erequest-\u003eoutputformat) {\n        case OutputFormat::XML:\n            $data-\u003etoXml(true)\n    ...\n\n```\n\n## Demo\nThere is a demo available to test this wrapper \\\nTwo options to use the demo:\n1. ### .env\n   ```php\n    RDW_API_DEMO=1\n   ```\n   Add this value to .env\n2. ### config\n   Import the rwd-api config en set the value to 1 ([Installation](#installation))\n   ```php\n    rdw_api_demo =\u003e 1,\n   ```\n   Demo: 0 = Off | 1 = On\n\n### Demo url\n```html\nhttp://[domainname]/rdw-api/demo \n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdkweb%2Frdw-api-filament","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjdkweb%2Frdw-api-filament","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjdkweb%2Frdw-api-filament/lists"}