Skip to content

Faker provider for random vehicle make/model and UK registration plate

License

Notifications You must be signed in to change notification settings

Codevate/faker-vehicle

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Faker Vehicle Provider

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

Install

This package is not available on Packagist, this means that in order to make Composer be aware of this package you will need to add this repository to your composer.json like below:

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/codevate/faker-vehicle.git"
        }
    ]

Then add "codevate/faker-vehicle": "^1.0" to your require or require-dev array.

Finally you need to add the provider to Faker:

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

Usage

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

About

Faker provider for random vehicle make/model and UK registration plate

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%