database/factories/ReviewFactory.php
/**
     * Define the model's default state.
     *
     * @return array
     */
Define the model's default state.
@return array
Define the model ' s default state . @return array
public function definition()
    {
        return [
            'user_id' => FactoryHelper::getRandomModelId(User::class),
            'product_id' => FactoryHelper::getRandomModelId(Product::class),
            'content' => $this->faker->paragraph(),  
            'rating' => random_int(1, 5),
        ];
    }
public function definition ( ) { return [ 'user_id' => FactoryHelper :: getRandomModelId ( User :: class ) , 'product_id' => FactoryHelper :: getRandomModelId ( Product :: class ) , 'content' => $ this -> faker -> paragraph ( ) , 'rating' => random_int ( 1 , 5 ) , ] ; }
Define the model's default state.
Define the model ' s default state .