Add tags to dummy bookmarks

This commit is contained in:
Jonny Barnes 2017-10-11 16:28:56 +01:00
parent 8f531d9055
commit abe5063c4a
2 changed files with 12 additions and 1 deletions

View file

@ -11,6 +11,8 @@ class BookmarksTableSeeder extends Seeder
*/
public function run()
{
factory(App\Bookmark::class, 10)->create();
factory(App\Bookmark::class, 10)->create()->each(function ($bookmark) {
$bookmark->tag()->save(factory(App\Tag::class)->make());
});
}
}