database/seeds/CategoryTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        $faker = Faker\Factory::create();
        foreach (range(1, 10) as $value) {
            Category::create([
                'name' => $faker->name,
                'slug' => Str::slug($faker->name),
            ]);
        }
    }
public function run ( ) { $ faker = Faker \ Factory :: create ( ) ; foreach ( range ( 1 , 10 ) as $ value ) { Category :: create ( [ 'name' => $ faker -> name , 'slug' => Str :: slug ( $ faker -> name ) , ] ) ; } }
Run the database seeds.
Run the database seeds .