PHP code example of insolita / fakerprovider
1. Go to this page and download the library: Download insolita/fakerprovider library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
insolita / fakerprovider example snippets
$faker = \Faker\Factory::create();
$faker->addProvider(insolita\faker\ShopProvider::class);
$faker->productUnit();
$faker->productModel();
$faker->productSize2d();
$faker->productSize3d();
$faker->productTitle();
$faker->productCategory();
$faker->productMaterial();
$faker->productAttribute();
$faker->productTrademark();
$factory->define(\App\Modules\Shop\Product::class, function (Faker\Generator $faker) {
$faker->addProvider(new \insolita\faker\ShopProvider($faker));
//....
});