Fix database seedings with new model namespace
This commit is contained in:
parent
4623c13c79
commit
a329b05d53
11 changed files with 40 additions and 32 deletions
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
|
||||
use App\Models\{Bookmark, Tag};
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class BookmarksTableSeeder extends Seeder
|
||||
|
@ -11,8 +12,8 @@ class BookmarksTableSeeder extends Seeder
|
|||
*/
|
||||
public function run()
|
||||
{
|
||||
factory(App\Bookmark::class, 10)->create()->each(function ($bookmark) {
|
||||
$bookmark->tags()->save(factory(App\Tag::class)->make());
|
||||
factory(Bookmark::class, 10)->create()->each(function ($bookmark) {
|
||||
$bookmark->tags()->save(factory(Tag::class)->make());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue