Download the PHP package jdkweb/rdw-api without Composer
On this page you can find all versions of the php package jdkweb/rdw-api. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jdkweb/rdw-api
More information about jdkweb/rdw-api
Files in jdkweb/rdw-api
Package rdw-api
Short Description Wrapper for RDW API for getting vehicle information from opendata.rdw.nl
License MIT
Informations about the package rdw-api
RDW API
Laravel wrapper for the Dutch open mobility data. Basic Vehicle Registration All non-sensitive data of the Dutch vehicle fleet.
Laravel application to get vehicle information from opendata.rdw.nl or overheid.io. \
This wrapper can be extended to be used in Filament: \
Table of contents
- Installation
- Translation
- Usage
- Request
- Response
- Demo
- Change Default API
- Extension for Filament
Installation
Requires PHP 8.1 and Laravel 10 or higher
Install the package via composer:
If needed you can publish the config
For changing options see: Demo
Translation
If changes are needed you can publish the translation files
Translations available:
Usage
- Request: RdwApiRequest
-
Response RdwApiResponse
Request
Basic usage
- Request to the active API (default: opendata.rdw.nl)
- All RDW endpoints are selected
- RdwApiResponse object is returned
All options used
Options
Select other API than default
Overwrite the config settings
- 0 or 'opendata' for using the RDW API opendata.rdw.nl [default]
- 1 or 'overheidio' for using the overheid.io API
Set Licenseplate
With or without hyphen-minus
Select endpoints for request
Available endpoints (not case sensitive):
- Endpoints::VEHICLE | vehicle
- Endpoints::VEHICLE_CLASS |vehicle_class
- Endpoints::FUEL | fuel
- Endpoints::BODYWORK | bodywork
- Endpoints::BODYWORK_SPECIFIC | bodywork_specific
- Endpoints::AXLES | axles
- Endpoints::cases() [default]
Format of the response output
- OutputFormat::ARRAY | array [default]
- OutputFormat::JSON | json
- OutputFormat::XML | xml
by using this method the response contains a formated output. see RdwApiResponse
Set output language
Force output language, so form can be English and RDW response in Dutch. \ Available:
- nl
- en
Send the request
RdwApiResponse object will be returned \ When boolean isset and true RdwApiRequest object will be returned
Response
Response data form the RDW API request in $result:
Response methods
Format for response data
Boolean to make xml readable
quickSearch method
Get specific values form response data, always use Dutch key for the value.
- Use dutch key for the value
- When more results:\
Axles: axle_location_code for first and second:
- 1.plaatscode_as
- 2.plaatscode_as
Example request
Request:
the method setOutputformat creates a prepared output else output is empty
Response:
$result is an RdwApiResponse object
Json output:
Demo
There is a demo available to test this wrapper \ Two options to use the demo:
-
.env
Add this value to .env
-
config
Import the rwd-api config en set the value to 1 (Installation)
Demo: 0 = Off | 1 = On
Demo url
API
Changing Default API\
- 0: opendata.rdw.nl
- 1: overheid.io
Use setApi method in request
Or import the rwd-api config (Installation) \ And set 'rdw_api_use' to the correct value
To use https://overheid.io a token is needed \
Place the token in the config: 'rdw_api_key'.
Filament
To use this wrapper in Filament install the filament extension
All versions of rdw-api with dependencies
guzzlehttp/guzzle Version ^6.5.8|^7.4.5
spatie/array-to-xml Version ^3.0.0