trait HasFactory

Methods

static Factory
factory(callable|array|int|null $count = null, callable|array $state = [])

Get a new factory instance for the model.

static Factory|null
newFactory()

Create a new factory instance for the model.

static Factory|null
getUseFactoryAttribute()

Get the factory from the UseFactory class attribute.

Details

at line 22
static Factory factory(callable|array|int|null $count = null, callable|array $state = [])

Get a new factory instance for the model.

Parameters

callable|array|int|null $count
callable|array $state

Return Value

Factory

at line 36
static protected Factory|null newFactory()

Create a new factory instance for the model.

Return Value

Factory|null

at line 50
static protected Factory|null getUseFactoryAttribute()

Get the factory from the UseFactory class attribute.

Return Value

Factory|null