*/ class UpvoteFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Upvote::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'user_id' => User::factory(), 'product_id' => Product::factory(), ]; } }