database/factories/DemoContentFactory.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 [
            'name' => $this->faker->randomNumber(3) . ("-" . $this->faker->colorName()),
            'type' => $this->faker->randomKey(['Printer', 'Pencil', 'Clipper']),
            'main_product_id' => $this->faker->numberBetween(1,50),
            'price' => $this->faker->randomFloat(2,5,80),
            'production_date' => $this->faker->dateTimeBetween('-5 years', 'now'),
            'status' => $this->faker->boolean
        ];
    }
public function definition ( ) { return [ 'name' => $ this -> faker -> randomNumber ( 3 ) . ( " - " . $ this -> faker -> colorName ( ) ) , 'type' => $ this -> faker -> randomKey ( [ 'Printer' , 'Pencil' , 'Clipper' ] ) , 'main_product_id' => $ this -> faker -> numberBetween ( 1 , 50 ) , 'price' => $ this -> faker -> randomFloat ( 2 , 5 , 80 ) , 'production_date' => $ this -> faker -> dateTimeBetween ( '-5 years' , 'now' ) , 'status' => $ this -> faker -> boolean ] ; }
Define the model's default state.
Define the model ' s default state .