WithFaker

trait WithFaker (View source)

Properties

protected Generator $faker The Faker instance.

Methods

void setUpFaker()

Setup up the Faker instance.

Generator faker(string $locale = null)

Get the default Faker instance for a given locale.

Generator makeFaker(string $locale = null)

Create a Faker instance for the given locale.

Details

protected void setUpFaker()

Setup up the Faker instance.

Return Value

void

protected Generator faker(string $locale = null)

Get the default Faker instance for a given locale.

Parameters

string $locale

Return Value

Generator

protected Generator makeFaker(string $locale = null)

Create a Faker instance for the given locale.

Parameters

string $locale

Return Value

Generator

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.7/Illuminate/Foundation/Testing/WithFaker.html