test laravel create each(function ($u)
snippet in php

test laravel create each(function ($u)

user4326

public function run()
{
  factory(App\User::class, 2)->create()->each(function($u) {
    $u->issues()->save(factory(App\Issues::class)->make());
  });
}