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.
Laravel Cloud is the best place to deploy Laravel, Nuxt, Express, Hono, Node.js, Bun, Go, Flask, Python, and more, with dedicated infrastructure available on AWS through Laravel Private Cloud.