HasFactory
trait HasFactory (View source)
Methods
static TFactory
factory(callable(array<string, mixed>, static|null): array<string, mixed>|array<string, mixed>|int|null $count = null, callable(array<string, mixed>, static|null): array<string, mixed>|array<string, mixed> $state = [])
Get a new factory instance for the model.
static TFactory|null
newFactory()
Create a new factory instance for the model.
static TFactory|null
getUseFactoryAttribute()
Get the factory from the UseFactory class attribute.
Details
static TFactory
factory(callable(array<string, mixed>, static|null): array<string, mixed>|array<string, mixed>|int|null $count = null, callable(array<string, mixed>, static|null): array<string, mixed>|array<string, mixed> $state = [])
Get a new factory instance for the model.
static protected TFactory|null
newFactory()
Create a new factory instance for the model.
static protected TFactory|null
getUseFactoryAttribute()
Get the factory from the UseFactory class attribute.