*/ class PaymentAllocationFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = PaymentAllocation::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'payment_id' => Payment::factory(), 'invoice_id' => Invoice::factory(), 'amount' => $this->faker->numberBetween(1, 10000), 'base_amount' => $this->faker->numberBetween(1, 10000), ]; } }