class UseFactory

Declare the factory class for a model using an attribute.

When placed on a model class that uses the HasFactory trait, the specified factory will be used when calling the model's factory() method.

Methods

__construct(string $factoryClass)

Create a new attribute instance.

Details

at line 34
__construct(string $factoryClass)

Create a new attribute instance.

Parameters

string $factoryClass