Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

spyworld's avatar

unable to add faker provider

L8 faker factory with provider

We want to add faker provider into container. For global use propose. Please create a factory method allow us to add provider. Thank You.

This is my temporarily solution to add faker provider it

public function definition()
    {
        $this->faker->addProvider( new CustomFakerProvider( $this->faker ) );
        return [
            'code' => $this->faker->customElement
        ];
    }
0 likes
1 reply

Please or to participate in this conversation.