database/factories/ArticleFactory.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 [
            'title'=>$this->faker->sentence,
            'content'=>$this->faker->paragraph,
            'category_id'=>rand(1,10)
        ];
    }
public function definition ( ) { return [ 'title' => $ this -> faker -> sentence , 'content' => $ this -> faker -> paragraph , 'category_id' => rand ( 1 , 10 ) ] ; }
Define the model's default state.
Define the model ' s default state .