PHP code example of davarch / faker-russian

1. Go to this page and download the library: Download davarch/faker-russian 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/ */

    

davarch / faker-russian example snippets


    'faker_locale' => 'ru_RU',

use Illuminate\Support\Str;
use Illuminate\Database\Eloquent\Factories\Factory;
 
class UserFactory extends Factory
{
    /**
     * @var \Davarch\FakerRussian\Faker
     */
    protected $faker;
    
    public function definition(): array
    {
        return [
            'name' => $this->faker->name(),
            'bik' => $this->faker->bik(),
            'cadastral_number' => $this->faker->cadastralNumber(),
            'correspondent_account' => $this->faker->correspondentAccount(),
            'inn' => $this->faker->inn(),
            'kpp' => $this->faker->kpp(),
            'ogrn' => $this->faker->ogrn(),
            'okato' => $this->faker->okato(),
            'okpo' => $this->faker->okpo(),
            'rs' => $this->faker->rs(),
            'snils' => $this->faker->snils(),
        ];
    }
}