database/seeds/ItemSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        factory(App\Item::class, 25)->create()->each(function ($item) {
            $item->specs()->saveMany(
                factory(App\Specification::class, 5)->make());
        });
    }
public function run ( ) { factory ( App \ Item :: class , 25 ) -> create ( ) -> each ( function ( $ item ) { $ item -> specs ( ) -> saveMany ( factory ( App \ Specification :: class , 5 ) -> make ( ) ) ; } ) ; }
Run the database seeds.
Run the database seeds .