trait Illuminate / Foundation / Testing / WithFaker
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

WithFaker

Properties

protected

$faker Faker\Generator

The Faker instance.

Default: null

Methods

protected

setUpFaker ( ) : void

Setup up the Faker instance.

protected

faker ( $locale ) : Faker\Generator

Get the default Faker instance for a given locale.

Parameters

  • $locale string|null
protected

makeFaker ( $locale ) : Faker\Generator

Create a Faker instance for the given locale.

Parameters

  • $locale string|null