*/ final class ProductCommentFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = ProductComment::class; /** * Define the model's default state. * * @return array */ public function definition(): array { return [ 'product_id' => fake()->randomElement(Product::pluck('id')), 'evaluation' => fake()->word, 'aspect' => fake()->word, 'taste' => fake()->word, 'odor' => fake()->word, 'texture' => fake()->word, ]; } }