mattwells/faker-vehicle

Faker provider for vehicles

v1.1 2019-04-26 10:49 UTC

This package is auto-updated.

Last update: 2025-04-27 00:45:34 UTC


README

A provider for Faker to generate random vehicle makes & models as well as UK registration plate and US license plate.

Install

Install this package via composer

composer require mattwells/faker-vehicle

Finally you need to add the provider to Faker

$faker = \Faker\Factory::create();
$faker->addProvider(new \MattWells\Faker\Vehicle\Provider($faker));

Usage

echo $faker->vehicleMake;         // Nissan
echo $faker->vehicleModel;        // C Class
echo $faker->vehicleModel('BMW'); // 3 Series

// UK Registration Plate
echo $faker->vehicleRegistration; // XA13 LYE

// US License Plate
echo $faker->vehicleLicensePlate; // 8BE V34