karl456/laravel-vehicle-enquiry-service

Vehicle Enquiry Service for Laravel

1.0.0 2023-02-07 23:15 UTC

This package is auto-updated.

Last update: 2024-11-08 03:15:11 UTC


README

A Laravel package for getting vehicle data from the DVLA via the Vehicle Enquiry Service.

Full documentation can be found here: https://developer-portal.driver-vehicle-licensing.api.gov.uk/apis/vehicle-enquiry-service/vehicle-enquiry-service-description.html

API Key

To obtain an API key you must submit a request here: https://register-for-ves.driver-vehicle-licensing.api.gov.uk/

Installation

composer require karl456/laravel-vehicle-enquiry-service

Add your VES API key to your .env file

VEHICLE_ENQUIRY_SERVICE_KEY=
VEHICLE_ENQUIRY_SERVICE_LIVE=true/false

You can publish the config file with:

php artisan vendor:publish --provider="Karl456\VehicleEnquiryService\Providers\VehicleEnquiryServiceProvider" --tag="config"

Usage

use Karl456\VehicleEnquiryService\Facades\VehicleEnquiryServiceFacade;

$response = VehicleEnquiryServiceFacade::enquire($registrationNumber);

$response->taxStatus;