PHP Classes

File: Readme.md

Recommend this page to a friend!
  Classes of Insolita   PHP Faker Provider   Readme.md   Download  
File: Readme.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: PHP Faker Provider
Provide fake data to test shopping pages
Author: By
Last change:
Date: 2 years ago
Size: 900 bytes
 

Contents

Class file image Download

Faker Shop-data provider (Russian only)

????????? ?????????, ??????? ???????, ??????????, ????????, ??????? ? ????????? ???????

  composer require "insolita\fakerprovider":"~1.0"

 $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();

// in some cases, if you have faker instance as closure argument- add provider like

$factory->define(\App\Modules\Shop\Product::class, function (Faker\Generator $faker) {
    $faker->addProvider(new \insolita\faker\ShopProvider($faker));
    //....
});