database/seeds/UsersTableSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    { 
       factory(App\User::class, 10)->create()->each(function ($user) {
            $user->posts()->save(factory(App\Post::class)->make());
        });
    }
public function run ( ) { factory ( App \ User :: class , 10 ) -> create ( ) -> each ( function ( $ user ) { $ user -> posts ( ) -> save ( factory ( App \ Post :: class ) -> make ( ) ) ; } ) ; }
Run the database seeds.
Run the database seeds .
//penser a masquer pour la suite 