database/factories/CategoryFactory.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()
    {
        $name= $this->faker->unique()->word(20);
        return [
            'name' => $name,
            'slug' => Str::slug($name),
        ];
    }
public function definition ( ) { $ name = $ this -> faker -> unique ( ) -> word ( 20 ) ; return [ 'name' => $ name , 'slug' => Str :: slug ( $ name ) , ] ; }
Define the model's default state.
Define the model ' s default state .
//