davarch/faker-russian

There is no license information available for the latest version (1.0.3) of this package.

1.0.3 2023-11-04 18:25 UTC

This package is auto-updated.

Last update: 2025-07-04 22:10:54 UTC


README

Faker russian specific values INN, OGRN, KPP etc.

Installation

composer require --dev davarch/faker-russian

Change faker_locale in config/app.php

    'faker_locale' => 'ru_RU',

Usage

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(),
        ];
    }
}

Code style

composer pint

Analyse

composer stan

Tests

composer test
composer types
composer coverage