Factory
abstract class Factory (View source)
Properties
| protected int | $count | How many is it creating the row |
|
| protected int | $bundleSize | The number of order lines to generate for each order. |
|
| protected array | $state | Change key-value pairs in the definition |
Methods
Define a factory definition for online mall companies
Create definition(s) with the given state and count
Get header cells
Apply configured values to a generated record.
Details
abstract array
definition()
Define a factory definition for online mall companies
static Factory
make()
Create a new Factory instance
Factory
count(int|null $count = null)
Update the count of the returned definitions
Factory
bundle(int $bundleSize)
Set the number of rows to create for each order.
Factories that support grouped orders use this value to share order-level fields and calculate bundle totals.
Factory
state(array $state)
Update the state of the returned definitions
array
create()
Create definition(s) with the given state and count
array
header()
Get header cells
protected array
applyState(array $record)
Apply configured values to a generated record.